public virtual void OnTrafficLightStatusChange(TrafficLightStatus status) { if (TrafficStatusChanged == null) { return; } TrafficEventArgs arg = new TrafficEventArgs(status); TrafficStatusChanged(this, arg); }
/// <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; } } }
public virtual void OnTrafficLightStatusChange(TrafficLightStatus status) { if (TrafficStatusChanged == null) return; TrafficEventArgs arg = new TrafficEventArgs(status); TrafficStatusChanged(this, arg); }