Exemplo n.º 1
0
        private void SetPerf()
        {
            performance_mode = Convert.ToInt32(Registry.GetValue(keyName, "PerformanceMode", 0));
            switch (performance_mode)
            {
            case 1:
                object data = (object)0;
                WMIEC.WMIReadECRAM(1115UL, ref data);
                if (((long)Convert.ToUInt64(data) & 1L) != 1L)
                {
                    MySetting.SilentModeOnOff();
                }
                System.IO.File.Copy(path + @"\Throttlestop\Basic.ini", path + @"\Throttlestop\ThrottleStop.ini", true);
                break;

            case 2:
                data = (object)0;
                WMIEC.WMIReadECRAM(1115UL, ref data);
                if (((long)Convert.ToUInt64(data) & 1L) == 1L)
                {
                    MySetting.SilentModeOnOff();
                }
                System.IO.File.Copy(path + @"\Throttlestop\Basic.ini", path + @"\Throttlestop\ThrottleStop.ini", true);

                break;

            case 3:
                data = (object)0;
                WMIEC.WMIReadECRAM(1115UL, ref data);
                if (((long)Convert.ToUInt64(data) & 1L) == 1L)
                {
                    MySetting.SilentModeOnOff();
                }
                System.IO.File.Copy(path + @"\Throttlestop\Performance.ini", path + @"\Throttlestop\ThrottleStop.ini", true);
                break;
            }
            if ((throttlestop = Convert.ToInt32(Registry.GetValue(keyName, "ThrottleStop", 1))) == 1)
            {
                foreach (var process in Process.GetProcessesByName("ThrottleStop"))
                {
                    process.Kill();
                }
                Process.Start(path + "/Throttlestop/ThrottleStop.exe");
            }
            Environment.Exit(1);
        }
Exemplo n.º 2
0
        private void SetPerf()
        {
            performance_mode = Convert.ToInt32(Registry.GetValue(keyName, "PerformanceMode", 0));
            switch (performance_mode)
            {
            case 1:
                object data = (object)0;
                WMIEC.WMIReadECRAM(1115UL, ref data);
                if (((long)Convert.ToUInt64(data) & 1L) != 1L)
                {
                    MySetting.SilentModeOnOff();
                }
                Set_TuningID(48U, Convert.ToDecimal(35));     //cpu boost
                Set_TuningID(47U, Convert.ToDecimal(35));
                break;

            case 2:
                data = (object)0;
                WMIEC.WMIReadECRAM(1115UL, ref data);
                if (((long)Convert.ToUInt64(data) & 1L) == 1L)
                {
                    MySetting.SilentModeOnOff();
                }
                Set_TuningID(48U, Convert.ToDecimal(35));     //cpu boost
                Set_TuningID(47U, Convert.ToDecimal(35));
                break;

            case 3:
                data = (object)0;
                WMIEC.WMIReadECRAM(1115UL, ref data);
                if (((long)Convert.ToUInt64(data) & 1L) == 1L)
                {
                    MySetting.SilentModeOnOff();
                }
                Set_TuningID(48U, Convert.ToDecimal(50));     //cpu boost
                Set_TuningID(47U, Convert.ToDecimal(70));
                break;
            }
            Application.Exit();
        }