Ejemplo n.º 1
0
        public override void Trigger(List <KeyValuePair <string, string> > semanticsToDict)
        {
            RequestGrammarUpdate.Invoke(this, new GrammarUpdateRequestEventArgs());
            AppSwitcher switcher = new AppSwitcher();

            if (semanticsToDict[0].Key == "switch to")
            {
                if (semanticsToDict[1].Key == "first application")
                {
                    switcher.SwitchToApp(1);
                }
                if (semanticsToDict[1].Key == "second application")
                {
                    switcher.SwitchToApp(2);
                }
                if (semanticsToDict[1].Key == "third application")
                {
                    switcher.SwitchToApp(3);
                }
                if (semanticsToDict[1].Key == "fourth application")
                {
                    switcher.SwitchToApp(4);
                }
                if (semanticsToDict[1].Key == "fifth application")
                {
                    switcher.SwitchToApp(5);
                }
                if (semanticsToDict[1].Key == "sixth application")
                {
                    switcher.SwitchToApp(6);
                }
                if (semanticsToDict[1].Key == "seventh application")
                {
                    switcher.SwitchToApp(7);
                }
                if (semanticsToDict[1].Key == "eighth application")
                {
                    switcher.SwitchToApp(8);
                }
                if (semanticsToDict[1].Key == "nineth application")
                {
                    switcher.SwitchToApp(9);
                }
            }
            if (semanticsToDict[0].Key == "next application")
            {
                switcher.SwitchAhead(1);
            }
        }
Ejemplo n.º 2
0
 public override void Trigger(List<KeyValuePair<string, string>> semanticsToDict)
 {
     RequestGrammarUpdate.Invoke(this, new GrammarUpdateRequestEventArgs());
     AppSwitcher switcher = new AppSwitcher();
     if(semanticsToDict[0].Key == "switch to"){
         if(semanticsToDict[1].Key == "first application"){
             switcher.SwitchToApp(1);
         }
         if(semanticsToDict[1].Key == "second application"){
             switcher.SwitchToApp(2);
         }
         if(semanticsToDict[1].Key == "third application"){
             switcher.SwitchToApp(3);
         }
         if(semanticsToDict[1].Key == "fourth application"){
             switcher.SwitchToApp(4);
         }
         if(semanticsToDict[1].Key == "fifth application"){
             switcher.SwitchToApp(5);
         }
         if(semanticsToDict[1].Key == "sixth application"){
             switcher.SwitchToApp(6);
         }
         if(semanticsToDict[1].Key == "seventh application"){
             switcher.SwitchToApp(7);
         }
         if(semanticsToDict[1].Key == "eighth application"){
             switcher.SwitchToApp(8);
         }
         if(semanticsToDict[1].Key == "nineth application"){
             switcher.SwitchToApp(9);
         }
     }
     if(semanticsToDict[0].Key == "next application"){
         switcher.SwitchAhead(1);
     }
 }