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(); } }
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(); } }