Example #1
0
 void stopConnector()
 {
     if (_connector == null)
     {
         return;
     }
     addLog("STOP connector...");
     _connector.Dispose();
     _connector = null;
     if (_wifi != null)
     {
         _wifi.Dispose();
         _wifi = null;
     }
     addLog("connector stopped.");
 }
Example #2
0
 public void Dispose()
 {
     if (backgroundThread != null)
     {
         _bStopThread = true;
         Thread.Sleep(1000);
         if (backgroundThread != null)
         {
             backgroundThread.Abort();
         }
     }
     if (_wifi != null)
     {
         _wifi.Dispose();
         _wifi = null;
     }
 }