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