Exemple #1
0
 /// <summary>
 /// 绑定异常事件
 /// </summary>
 /// <param name="errorEvent"></param>
 public void BindErrorEvent(DelegateErrorEvent errorEvent)
 {
     if (DeviceType != DAQNaviDecvice.None && IDevice != null)
     {
         IDevice.EventError += errorEvent;
     }
 }
Exemple #2
0
 /// <summary>
 /// Обработка ошибки - процедура синхронизируется с потоком Control и вызывается событие
 /// </summary>
 /// <param name="msg">Сообщение об ошибке</param>
 private void ErrorEvent(string msg)
 {
     if (Control.InvokeRequired)
     {
         DelegateErrorEvent Ev = new DelegateErrorEvent(ErrorEvent);
         Control.Invoke(Ev, msg);
     }
     else
     {
         if (OnError != null)
         {
             OnError(this, new EventMsgArgs(msg));
         }
     }
 }