コード例 #1
0
 protected virtual void OnTempEvents(TempEventArgs obj)
 {
     if (TempEvents != null)
     {
         TempEvents(this, obj);
     }
 }
コード例 #2
0
        public TempControl(Relay control)
        {
            Control = control;

            Temp = new TempEventArgs();

            Temp.TempStateChange += new Action <TempEventArgs>(Temp_TempStateChange);

            Control.StateChange += new RelayEventHandler(TempControl_StateChange);
        }
コード例 #3
0
 void Temp_TempStateChange(TempEventArgs obj)
 {
     if (obj.Status == TempEventArgs.State.on)
     {
         on();
     }
     else if (obj.Status == TempEventArgs.State.off)
     {
         off();
     }
     OnTempEvents(obj);
 }
コード例 #4
0
 void TempControl_TempEvents(object sender, TempEventArgs e)
 {
     NotifyClients("Ambient: " + e.Ambient + ", Setpoint: " + e.Setpoint + ", Status: " + e.Status.ToString());
 }
コード例 #5
0
 void TempControl_TempEvents(object sender, TempEventArgs e)
 {
     //throw new NotImplementedException();
 }