Esempio n. 1
0
        public virtual void OnTrafficLightStatusChange(TrafficLightStatus status)
        {
            if (TrafficStatusChanged == null)
            {
                return;
            }
            TrafficEventArgs arg = new TrafficEventArgs(status);

            TrafficStatusChanged(this, arg);
        }
Esempio n. 2
0
 /// <summary>
 /// 红绿灯控制
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void rtuControl1_TrafficStatusChanged(object sender, TrafficEventArgs e)
 {
     if (_measApp != null && _measApp.Rtu != null)
     {
         switch (e.Value)
         {
             case TrafficLightStatus.Red:
                 _measApp.Rtu.OpenRed();
                 break;
             case TrafficLightStatus.Green:
                 _measApp.Rtu.OpenGreen();
                 break;
         }
     }
 }
Esempio n. 3
0
 public virtual void OnTrafficLightStatusChange(TrafficLightStatus status)
 {
     if (TrafficStatusChanged == null) return;
     TrafficEventArgs arg = new TrafficEventArgs(status);
     TrafficStatusChanged(this, arg);
 }