public virtual void OnRingStatusChange(RingStatus status) { if (RingStatusChanged == null) { return; } RingEventArgs arg = new RingEventArgs(status); RingStatusChanged(this, arg); }
/// <summary> /// 电铃开关控制 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void rtuControl1_RingStatusChanged(object sender, RingEventArgs e) { if (_measApp != null && _measApp.Rtu != null) { switch (e.Value) { case RingStatus.Ring: _measApp.Rtu.OpenRing(); break; case RingStatus.Stop: _measApp.Rtu.CloseRing(); break; } } }
public virtual void OnRingStatusChange(RingStatus status) { if (RingStatusChanged == null) return; RingEventArgs arg = new RingEventArgs(status); RingStatusChanged(this, arg); }