Esempio n. 1
0
        public virtual void OnLightStatusChange(LightStatus status)
        {
            if (LightStatusChanged == null)
            {
                return;
            }
            LightEventArgs arg = new LightEventArgs(status);

            LightStatusChanged(this, arg);
        }
Esempio n. 2
0
 /// <summary>
 /// 照明灯开关控制
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void rtuControl1_LightStatusChanged(object sender, LightEventArgs e)
 {
     if (_measApp != null && _measApp.Rtu != null)
     {
         switch (e.Value)
         {
             case LightStatus.Closed:
                 _measApp.Rtu.CloseLight();
                 break;
             case LightStatus.Open:
                 _measApp.Rtu.OpenLight();
                 break;
         }
     }
 }
Esempio n. 3
0
 public virtual void OnLightStatusChange(LightStatus status)
 {
     if (LightStatusChanged == null) return;
     LightEventArgs arg = new LightEventArgs(status);
     LightStatusChanged(this, arg);
 }