Пример #1
0
 private void RegisterCommands(AlexaSmartListenercs listenercs)
 {
     foreach (string commands in listenercs.VoiceCommands.Keys)
     {
         Commands[commands] = listenercs.VoiceCommands[commands];
     }
 }
Пример #2
0
        public static void Main(string[] args)
        {
            AlexaSmartListenercs listener = new AlexaSmartListenercs();
            AlexaSmartControl    control  = new AlexaSmartControl(listener);

            Console.WriteLine("Bem vindo a sua assitente virtual Alexa: oque posso lhe ajudar?");

            int count = 0;

            while (!control.ShutDownCommand)
            {
                Console.WriteLine("Ligado...");
                count++;

                listener.ProcessVoiceCommand("onLight");

                if (count == 10)
                {
                    control.RunShutDownCommand();
                }
            }
        }
Пример #3
0
 public AlexaSmartControl(AlexaSmartListenercs listener)
 {
     RegisterCommands(listener);
     listener.EmitCommand += Listener_EmitCommand;
 }