static async Task RunLightCommand02()
        {
            LocalHueClient client = await HueManager.GetClient();

            if (client == null)
            {
                return;
            }

            var command = new LightCommand();

            // some random settings for tests
            command.SetColor(new RGBColor(255, 255, 255));
            client.SendCommandAsync(command);
            Thread.Sleep(1000);
            command.TurnOff();
            client.SendCommandAsync(command);
            Thread.Sleep(1000);
            command.TurnOn();
            client.SendCommandAsync(command);
            Thread.Sleep(1000);
            command.TurnOff();
            client.SendCommandAsync(command);
            Thread.Sleep(1000);
            command.TurnOn();
            client.SendCommandAsync(command);
            Thread.Sleep(1000);
            command.SetColor(new RGBColor(127, 0, 255));
            client.SendCommandAsync(command);
        }
        private void Cue2Button_OnClickButton_Click(object sender, RoutedEventArgs e)
        {
            HueManager.GetClient();
            Thread.Sleep(500);
            RunLightCommand02();

            Console.WriteLine("Ran some lights");
        }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            // Doesn't need to register
            //Register();
            //Thread.Sleep(500);
            HueManager.GetClient();
            Thread.Sleep(500);
            RunLightCommand();

            Console.WriteLine("Ran some lights");
        }