コード例 #1
0
 public static void exit()
 {
     try
     {
         WinUSBController.exitUSB();
     }
     catch { }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: HardwareManager.cs プロジェクト: twone38/FanCtrl
        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);
        }