Saturday 2 July 2016

Introduction To Microsoft Azure

 Explaining Microsoft Azure:
DEVELOPER: (MICROSOFT) 
OS:                   LINUX, WINDOWS
WEBSITE:       azure.microsoft.com  

Azure was first announced in 2008
Journey From Windows Azure to Microsoft Azure:
Azure was first released on 2010 as WINDOWS AZURE and on 25 March 2014 azure came up with a new name and along with amazon web services it is named as MICROSOFT AZURE . Now a days Azure is the leader of Infrastructure as a service (IaaS).
There are three Main categories of cloud computing services:
  1. IaaS (Infrastructure as a Service)
  2. PaaS (Platform as a Service)
  3. SaaS (Software as a Service)


Popular Products of Azure
Most popular products of azure are
  • Cloud Services
  • Storage
  • SQL Database
  • App Services
  • Document DB
  • Active Directory
  • Backup
  •  App Service
  • Virtual Machine 
Data Center Regions:
There are Currently 32 Microsoft azure data centers in which 24 of them are working while 8 are new announced.
These data centers are in United States, Canada, Europe, South America, Australia,India, Germany, United Kingdom, Japan, and china.
Certification:
You have to pass three exams to achieve title of Microsoft Certified Azure Solution Architect  By passing any one of the exams the student will also earn the title of Microsoft Certified Professional (MCP)
 Exam Code:
  1. MS70-532
  2. MS70-533
  3. MS70-534 

Wednesday 22 June 2016

From Introduction to Installation (Win Form App)

This post cover following topics in detail.


  • What is windows form application?
  • Examples of windows Form applications.
  • Creating your first form.
  • Publishing your first app.
  • Installation of application.

By reading this you may able to create your first windows app you can also publish it than install it. and than use your app like a boss ;)



What is windows form application?


Windows Forms is a graphical (GUI) class library included as a part of Microsoft .NET Framework, providing a platform to write rich client applications for desktop, laptop, and tablet PCs.

Examples of Windows Forms


Examples include

  1. drawing or graphics applications
  2. data-entry systems
  3. point-of-sale systems
  4. games.



Creating First Form


Steps:

1- Install visual studio

2- Open visual studio and click on new project



   3-Than select visual c#. than click on windows form application and name it and click OK.


    4- Now Project is created.



   5- Drag Drop things from ToolBox according to your requirements as shown on left side.




Now your first form is created click on start to see your running app like this.



Publishing your first app


You must have Click Once publishing tool installed before publishing your app.
If this tool is not installed than follow the following steps.

1- Go to uninstall and remove programs
2- Select visual studio and right click to change it
3- three options may appear . select modify option
4- than check the Click Once publishing tool checkbox.
5- and click on install

After installing this tool right click on your app name appear on the right side block of visual studio and click publish.



Select the path you want to publish and click finish.



Now your project is published at your desired location.

Installation of application.


After publishing your app the setup file is generated at your desired location.

double click on setup.exe file and click install. it may take some time and than your app is installed on your PC.

Now you can search it from you search box and enjoy it :)



Tuesday 21 June 2016

Multitasking Desktop app



Here we are building an desktop app. That perform Multiple Basic computer operations.

MAIN PAGE 



So, this desktop app allows you to perform following actions:

You can access following things via this app.
  1. Notepad
  2. Paint
  3. Calculator
  4. Task manager
  5. Ms. Word
  6. Excel
  7. Media Player
  8. Sound Recorder
  9. Notepad

Explaining Main Page View.

This Main page contain 10 buttons a simple text and a image is placed on button to explain its functionality.


What the app can done?

Whenever you click on a button this app can check weather the requesting app exists on your system or not. if exists than it can open the app for you otherwise a message box is displayed that "File Not Found"


Main Page CODE 

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MultitaskingApp
{
    public partial class MainPage : Form
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("notepad");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("mspaint");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("calc");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("Taskmgr");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button5_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("winword");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button6_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("Excel");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button7_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("wmplayer");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button8_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("psr");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void button9_Click(object sender, EventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start("wordpad");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }

        private void MainPage_Load(object sender, EventArgs e)
        {
                
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Umair hassan");
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
          Application.Exit();
        }
    }
}



         



Explaining Code

Every Button contain a try catch block like this
   try
            {
                System.Diagnostics.Process.Start("wordpad");
            }
            catch (Exception Ex)
            {
                MessageBox.Show("File Not Found \n \n \n" + Ex);
            }
        }






Firstly try block execute and if requesting app exists than it start the process
otherwise catch block is executed that shows a message box "File Not Found"

Screen also contain a MenuStrip contain About and Exit.

By clicking on about .. Author Name is displayed.
By clicking on Exit ..  Application.Exit(); Function calls.



Saturday 18 June 2016

Text to speech converter in C#



Text to speech converter in C#



Motivation comes to me when I am doing my project on Text to speech converter and it takes a lot of time to know about its syntax and libraries. So I decide to write on it so you can do conversion of text to speech with little effort by follow this pattern.

So don't worry if you doesn't know about:
1-      libraries to add.
2-      system reference to include in project.
3-      syntax of speech recognition and speech synthesis.

Starting from the very initial point


You must include this reference by right clicking on project name select reference
       Microsoft.system.speech;

Libraries to use in c-sharp:
    using System.Speech.Synthesis;
      using System.Speech.Recognition;




Syntax of Speech To Text


Public void SpeakText() {

PromptBuilder Pbuilder = new PromptBuilder();

SpeechSynthesizer synth = new SpeechSynthesizer();

Pbuilder.ClearContent();

Pbuilder.AppendText(“Text You want to speek”);


synth.Speak(Pbuilder); }





  Code for Desktop app:


   The form contains one textbox named textBox and a button named button1.
    Any thing you write in text box will be spoken by your computer when button1 is pressed.


using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Speech.Synthesis;
using System.Speech.Recognition;
using System.Threading;



namespace Project_Name

{
public partial class Form1 : Form

{
public Form1()

{

InitializeComponent();

}

SpeechSynthesizer synth = new SpeechSynthesizer();

PromptBuilder Pbuilder = new PromptBuilder();

private void Form1_Load(object sender, EventArgs e)

{

}

private void button1_Click(object sender, EventArgs e)

{

Pbuilder.ClearContent();

Pbuilder.AppendText(textBox1.Text);

synth.Speak(Pbuilder);

}

}

}

  Now that's all you need.
  So, are you ready to give a try to build your own speaking app?
  *Comments and suggestions are valuable