예제 #1
0
파일: Form1.cs 프로젝트: djdjz7/ReCPU
 public Form1()
 {
     if (!Directory.Exists(ApplicationData + @"\ReCPU"))
     {
         Directory.CreateDirectory(ApplicationData + @"\ReCPU");
     }
     if (!File.Exists(ApplicationData + @"\ReCPU\Settings.ini"))
     {
         File.Create(ApplicationData + @"\ReCPU\Settings.ini").Close();
     }
     InitializeComponent();
     //if (File.Exists(ApplicationData + @"\ReCPU\clear"))
     enableblur   = IniFunc.getString("ReCPU", "ClearMode", "false", ApplicationData + @"\ReCPU\Settings.ini");
     usecustomcpu = IniFunc.getString("ReCPU", "UseCustomCPU", "false", ApplicationData + @"\ReCPU\Settings.ini");
     if (enableblur == "true")
     {
         EnableBlur();
         isclear.Checked = true;
     }
     if (usecustomcpu == "true")
     {
         inputsellab.Text   = "Input or select CPU model:";
         dein.DropDownStyle = ComboBoxStyle.DropDown;
         useCustomCPUModelToolStripMenuItem.Checked = true;
         manuname.Enabled = false;
         modu1.Enabled    = false;
         cpugen.Enabled   = false;
     }
     if (!File.Exists(ApplicationData + @"\ReCPU\ORGCPU.reg"))
     {
         barLabel.Text     = "Backing up original CPU information...";
         barProgress.Value = 20;
         global::ReCPU.RegExportImport.ExportReg(ApplicationData + @"\ReCPU\ORGCPU.reg", @"HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0");
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: djdjz7/ReCPU
 private void allowCustomCPUModelToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (useCustomCPUModelToolStripMenuItem.Checked == true)
     {
         IniFunc.writeString("ReCPU", "UseCustomCPU", "true", ApplicationData + @"\ReCPU\Settings.ini");
         inputsellab.Text   = "Input CPU model:";
         dein.DropDownStyle = ComboBoxStyle.DropDown;
         dein.Items.Clear();
         dein.Enabled     = true;
         dein.Text        = null;
         manuname.Enabled = false;
         manuname.Items.Clear();
         manuname.Text = null;
         modu1.Enabled = false;
         modu1.Items.Clear();
         modu1.Text     = null;
         cpugen.Enabled = false;
         cpugen.Items.Clear();
         cpugen.Text = null;
     }
     else
     {
         IniFunc.writeString("ReCPU", "UseCustomCPU", "false", ApplicationData + @"\ReCPU\Settings.ini");
         inputsellab.Text   = "Select CPU model:";
         dein.DropDownStyle = ComboBoxStyle.DropDownList;
         manuname.Enabled   = true;
         modu1.Enabled      = true;
         cpugen.Enabled     = true;
         manuname.Items.Clear();
         manuname.Items.Add("Intel Core");
     }
     usecustomcpu = IniFunc.getString("ReCPU", "UseCustomCPU", "false", ApplicationData + @"\ReCPU\Settings.ini");
 }