public static void exit() { try { WinUSBController.exitUSB(); } catch { } }
public override void stop() { Monitor.Enter(mLock); mThreadState = false; if (mThread != null) { mThread.Join(); } try { if (mIsDeviceOpen == true) { WinUSBController.close(mDeviceHandle); mIsDeviceOpen = false; } WinUSBController.exitUSB(); } catch { } Monitor.Exit(mLock); }
public void stop() { Monitor.Enter(mLock); if (mIsStart == false) { Monitor.Exit(mLock); return; } mIsStart = false; mChangeControlList.Clear(); mChangeValueList.Clear(); mUpdateTimer.Stop(); if (mLHM != null) { mLHM.stop(); mLHM = null; } if (mOHM != null) { mOHM.stop(); mOHM = null; } for (int i = 0; i < mKrakenList.Count; i++) { try { mKrakenList[i].stop(); } catch { } } mKrakenList.Clear(); for (int i = 0; i < mCLCList.Count; i++) { try { mCLCList[i].stop(); } catch { } } mCLCList.Clear(); for (int i = 0; i < mRGBnFCList.Count; i++) { try { mRGBnFCList[i].stop(); } catch { } } mRGBnFCList.Clear(); if (mIsGigabyte == true && mGigabyte != null) { mIsGigabyte = false; mGigabyte.stop(); mGigabyte = null; } mSensorList.Clear(); mFanList.Clear(); mControlList.Clear(); SMBusController.close(); if (mISABusMutex != null) { mISABusMutex.Close(); mISABusMutex = null; } if (mSMBusMutex != null) { mSMBusMutex.Close(); mSMBusMutex = null; } if (mPCIMutex != null) { mPCIMutex.Close(); mPCIMutex = null; } OSDController.releaseOSD(); WinUSBController.exitUSB(); Monitor.Exit(mLock); }