void recEngine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            // MessageBox.Show(e.Result.Text);


            switch (e.Result.Text)
            {
            case "open youtube":
                Process.Start("https://youtube.com");
                break;

            case "open word":
                Process.Start("winword");

                break;

            case "open google":
                Process.Start("https://google.com");
                break;

            case "open notepad":
                Process.Start("notepad");
                break;

            case "open calculator":
                Process.Start("calc");
                break;

            case "open excel":
                Process.Start("excel");
                break;

            case "open snipping":
                Process.Start("snippingtool");
                break;

            case "open notepad plus plus":
                Process.Start("notepad++");
                break;

            case "open paint":
                Process.Start("mspaint");
                break;

            case "open powerpoint":
                Process.Start("powerpnt");
                break;

            case "edit photo":
                image_edit obj = new image_edit();
                obj.Show();
                break;

            case "send mail":
                mail obj1 = new mail();
                obj1.Show();
                break;

            case "set alarm":
                alarm obj2 = new alarm();
                obj2.Show();
                break;

            case "check net":
                int    Desc;
                string a = (InternetGetConnectedState(out Desc, 0).ToString());
                if (a == "True")
                {
                    MessageBox.Show("INTERNET IS AVAILABLE!!!");
                }
                else
                {
                    MessageBox.Show("NO INTERNET");
                }
                break;
            }
        }
예제 #2
0
        private void button6_Click(object sender, EventArgs e)
        {
            image_edit obj = new image_edit();

            obj.Show();
        }