Esempio n. 1
0
 public void MusicCommand(RecognizedPhrase e)
 {
     try
     {
         SpeechHandler.SetResponse(Processor.MusicCommand(e.Text));
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 2
0
 public void Friday()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.Friday());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 3
0
 public void PlayList()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.PlayList());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 4
0
 public void CheckInternet()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.CheckInternet());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 5
0
 public void Screenshot()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.Screenshot());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 6
0
 public void Complement()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.Complement());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 7
0
 public void ShowTime()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.ShowTime());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 8
0
 public void Greeting()
 {
     try
     {
         SpeechHandler.SetResponse(Processor.Greeting());
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 9
0
 public void Weather()
 {
     try
     {
         string home = "Cairo";
         SpeechHandler.SetResponse(Processor.Weather(home));
     }
     catch (Exception)
     {
         SpeechHandler.Invalid();
     }
 }
Esempio n. 10
0
        public void Converter(RecognizedPhrase e)
        {
            string num = e.Words[e.Words.Count - 1].Text;

            try
            {
                SpeechHandler.SetResponse(Processor.Converter(e.Text, num));
            }
            catch (Exception)
            {
                SpeechHandler.Invalid();
            }
        }
Esempio n. 11
0
        public void Type(RecognizedPhrase e)
        {
            string tobeTyped = e.Text.Substring(e.Text.IndexOf("this") + 4);

            try
            {
                Processor.Type(tobeTyped);
            }
            catch (Exception)
            {
                SpeechHandler.Invalid();
            }
        }
Esempio n. 12
0
        public void Search(RecognizedPhrase e)
        {
            int    len          = e.Words.Count;
            string searchprompt = e.Text.Substring(e.Text.IndexOf(":") + 1);

            try
            {
                SpeechHandler.SetResponse(Processor.Search(searchprompt));
            }
            catch (Exception)
            {
                SpeechHandler.Invalid();
            }
        }
Esempio n. 13
0
        public void Opener(RecognizedPhrase e)
        {
            int    len = e.Words.Count;
            string app = e.Words[len - 1].Text;

            try
            {
                SpeechHandler.SetResponse(Processor.Opener(app) + app);
            }
            catch (Exception)
            {
                SpeechHandler.Invalid();
            }
        }
Esempio n. 14
0
        public void RandomNum(RecognizedPhrase e)
        {
            int    len    = e.Words.Count;
            string numOne = e.Words[len - 3].Text;
            string numTwo = e.Words[len - 1].Text;

            try
            {
                SpeechHandler.SetResponse(Processor.RandomNum(numOne, numTwo));
            }
            catch (Exception)
            {
                SpeechHandler.Invalid();
            }
        }