예제 #1
0
        private static async Task DemoScenes(LifxClient client)
        {
            Console.WriteLine();
            Console.WriteLine("Scenes:");
            List <Scene> scenes = await client.ListScenes();

            if (scenes.Count() > 0)
            {
                foreach (var scene in scenes)
                {
                    Console.WriteLine(scene.ToString());
                }
                Console.WriteLine(string.Format("Activating Scene: {0}", scenes.First().Name));
                await client.ActivateScene(scenes.First().UUID);

                await Task.Delay(EFFECT_DELAY);
            }
            else
            {
                Console.WriteLine("No scenes on account.");
            }
        }