示例#1
0
 internal static void OnTemeratureChanged(object sender, TempChangeEventArgs e)
 {
     if (!State && e.Temperature < 14)
     {
         State = true;
         SwitchOn();
     }
     else if (State && e.Temperature > 18)
     {
         State = false;
         SwitchOff();
     }
 }
示例#2
0
文件: AC.cs 项目: akobziev/MyWorks
 public static void OnTemperatureChanged(object sender, TempChangeEventArgs ev)
 {
     if (!State && ev.Temperature > 25)
     {
         State = true;
         SwitchOn();
     }
     else if (State && ev.Temperature < 24)
     {
         State = false;
         SwitchOff();
     }
 }