Esempio n. 1
0
        public void stop()
        {
            for (int i = 0; i < mGigabyteAmdRadeonGraphicsModuleList.Count; i++)
            {
                mGigabyteAmdRadeonGraphicsModuleList[i].Dispose();
            }
            mGigabyteAmdRadeonGraphicsModuleList.Clear();

            for (int i = 0; i < mGigabyteNvidiaGeforceGraphicsModuleList.Count; i++)
            {
                mGigabyteNvidiaGeforceGraphicsModuleList[i].Dispose();
            }
            mGigabyteNvidiaGeforceGraphicsModuleList.Clear();

            if (mGigabyteSmartGuardianFanControlModule != null)
            {
                mGigabyteSmartGuardianFanControlModule.Dispose();
                mGigabyteSmartGuardianFanControlModule = null;
            }
            if (mGigabyteHardwareMonitorControlModule != null)
            {
                mGigabyteHardwareMonitorControlModule.Dispose();
                mGigabyteHardwareMonitorControlModule = null;
            }
            if (mGigabyteGraphicsCardControlModule != null)
            {
                mGigabyteGraphicsCardControlModule.Dispose();
                mGigabyteGraphicsCardControlModule = null;
            }

            mGigabyteTemperatureList.Clear();
            mGigabyteFanSpeedList.Clear();
        }
Esempio n. 2
0
        public bool start()
        {
            try
            {
                var controller = new EngineServiceController("EasyTuneEngineService");
                if (controller.IsInstall() == false)
                {
                    controller.Dispose();
                    this.stop();
                    return(false);
                }

                if (controller.Status != System.ServiceProcess.ServiceControllerStatus.Running)
                {
                    controller.Start();
                }
                controller.Dispose();
            }
            catch { }

            this.lockBus();
            try
            {
                mGigabyteHardwareMonitorControlModule = new HardwareMonitorControlModule();
                mGigabyteHardwareMonitorControlModule.Initialize(HardwareMonitorSourceTypes.HwRegister);

                mGigabyteSmartGuardianFanControlModule = new SmartGuardianFanControlModule();
                var temperatureList = new List <float>();
                mGigabyteSmartGuardianFanControlModule.GetHardwareMonitorDatas(ref temperatureList, ref mGigabyteFanSpeedList);

                if (OptionManager.getInstance().IsGigabyteGpu == true)
                {
                    var management = new GraphicsCardServiceManagement();
                    if (management.IsProcessExist() == true)
                    {
                        mGigabyteGraphicsCardControlModule = new GraphicsCardControlModule();
                        if (mGigabyteGraphicsCardControlModule.AmdGpuCount > 0)
                        {
                            mGigabyteGraphicsCardControlModule.GetObjects(ref mGigabyteAmdRadeonGraphicsModuleList);
                        }

                        if (mGigabyteGraphicsCardControlModule.NvidiaGpuCount > 0)
                        {
                            mGigabyteGraphicsCardControlModule.GetObjects(ref mGigabyteNvidiaGeforceGraphicsModuleList);
                        }
                    }
                }

                this.unlockBus();
                return(true);
            }
            catch
            {
                this.unlockBus();
                this.stop();
            }
            return(false);
        }
Esempio n. 3
0
        public void stop()
        {
            if (OptionManager.getInstance().IsGigabyteGpu == true)
            {
                for (int i = 0; i < mGigabyteAmdRadeonGraphicsModuleList.Count; i++)
                {
                    try
                    {
                        mGigabyteAmdRadeonGraphicsModuleList[i].Dispose();
                    }
                    catch { }
                }
                mGigabyteAmdRadeonGraphicsModuleList.Clear();

                for (int i = 0; i < mGigabyteNvidiaGeforceGraphicsModuleList.Count; i++)
                {
                    try
                    {
                        mGigabyteNvidiaGeforceGraphicsModuleList[i].Dispose();
                    }
                    catch { }
                }
                mGigabyteNvidiaGeforceGraphicsModuleList.Clear();
            }

            try
            {
                if (mGigabyteSmartGuardianFanControlModule != null)
                {
                    mGigabyteSmartGuardianFanControlModule.Dispose();
                    mGigabyteSmartGuardianFanControlModule = null;
                }
            }
            catch { }

            try
            {
                if (mGigabyteHardwareMonitorControlModule != null)
                {
                    mGigabyteHardwareMonitorControlModule.Dispose();
                    mGigabyteHardwareMonitorControlModule = null;
                }
            }
            catch { }

            try
            {
                if (mGigabyteGraphicsCardControlModule != null)
                {
                    mGigabyteGraphicsCardControlModule.Dispose();
                    mGigabyteGraphicsCardControlModule = null;
                }
            }
            catch { }

            mGigabyteTemperatureList.Clear();
            mGigabyteFanSpeedList.Clear();
        }