Ejemplo n.º 1
0
        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;
            }

            try
            {
                if (mKraken != null)
                {
                    mKraken.stop();
                    mKraken = null;
                }
            }
            catch { }

            try
            {
                if (mCLC != null)
                {
                    mCLC.stop();
                    mCLC = null;
                }
            }
            catch { }

            try
            {
                if (mRGBnFC != null)
                {
                    mRGBnFC.stop();
                    mRGBnFC = null;
                }
            }
            catch { }

            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();

            Monitor.Exit(mLock);
        }
Ejemplo n.º 2
0
        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);
        }