Esempio n. 1
0
        static void Main(string[] args)
        {
            ZoneController zone1 = new ZoneController(1, "192.168.0.7");

            Thread.Sleep(DateTime.Parse("1/30/2015 6:40") - DateTime.Now);
            ZoneStateRunner runner = new ZoneStateRunner(zone1,
                                                         new List <ZoneState> {
                new ZoneState()
                {
                    On         = true,
                    Brightness = 0,
                    Color      = 255,
                    DayOfWeek  = DayOfWeek.Friday,
                    Time       = new TimeSpan(6, 40, 0)
                },
                new ZoneState()
                {
                    Off        = true,
                    Brightness = 24,
                    Color      = 180,
                    DayOfWeek  = DayOfWeek.Friday,
                    Time       = new TimeSpan(7, 30, 0)
                }
            });

            while (DateTime.Now < DateTime.Parse("1/30/2015 7:30"))
            {
                runner.Run();
                Thread.Sleep(6000);
            }
        }
Esempio n. 2
0
 public ZoneStateRunner(ZoneController controller, List <ZoneState> states)
 {
     _Controller = controller;
     _States     = states;
 }