private void onHighLight(object sender, HighLightArgs e) { lightsensor ls = (lightsensor)sender; Console.WriteLine("high-light alert"); Console.WriteLine("light level: " + e.level); }
public void on() { lightS = new lightsensor("light sensor", 50, 20, 70); proximityS = new proximitysensor("proximity sensor", 100, 20); statusChanged += itemStatusChanged; toggle(); }