예제 #1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     isRun = false;
     seach.Abort();
     try
     {
         if (isA)
         {
             adam.Close();
         }
         if (isZ)
         {
             zigBee.Close();
         }
     }
     catch (Exception)
     {
     }
 }
예제 #2
0
 /// <summary>
 /// 释放设备资源
 /// </summary>
 private void DevicesDispose()
 {
     zigBeeDeivce.Close();
     if (adamDevices != null)
     {
         adamDevices.Close();
     }
     GetAdam4150Data.Abort();
     GetZigBeeData.Abort();
     GetAdam4150Data = null;
     GetZigBeeData   = null;
 }