protected virtual void OnTempEvents(TempEventArgs obj) { if (TempEvents != null) { TempEvents(this, obj); } }
public TempControl(Relay control) { Control = control; Temp = new TempEventArgs(); Temp.TempStateChange += new Action <TempEventArgs>(Temp_TempStateChange); Control.StateChange += new RelayEventHandler(TempControl_StateChange); }
void Temp_TempStateChange(TempEventArgs obj) { if (obj.Status == TempEventArgs.State.on) { on(); } else if (obj.Status == TempEventArgs.State.off) { off(); } OnTempEvents(obj); }
void TempControl_TempEvents(object sender, TempEventArgs e) { NotifyClients("Ambient: " + e.Ambient + ", Setpoint: " + e.Setpoint + ", Status: " + e.Status.ToString()); }
void TempControl_TempEvents(object sender, TempEventArgs e) { //throw new NotImplementedException(); }