예제 #1
0
        private void onHighLight(object sender, HighLightArgs e)
        {
            lightsensor ls = (lightsensor)sender;

            Console.WriteLine("high-light alert");
            Console.WriteLine("light level: " + e.level);
        }
예제 #2
0
 public void on()
 {
     lightS         = new lightsensor("light sensor", 50, 20, 70);
     proximityS     = new proximitysensor("proximity sensor", 100, 20);
     statusChanged += itemStatusChanged;
     toggle();
 }