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"); }
private void isclear_Click(object sender, EventArgs e) { if (isclear.Checked == true) { IniFunc.writeString("ReCPU", "ClearMode", "true", ApplicationData + @"\ReCPU\Settings.ini"); switch (MessageBox.Show(@"ClearMode should only be enabled under Windows 10 environment. Do not try it under Windows 7/8/8.1. The application will atomaticly reload to take effect. Please notice: The display effect is not ideal. Continue?", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)) { case DialogResult.None: break; case DialogResult.OK: break; case DialogResult.Cancel: break; case DialogResult.Abort: break; case DialogResult.Retry: break; case DialogResult.Ignore: break; case DialogResult.Yes: break; case DialogResult.No: isclear.Checked = false; return; default: break; } this.Hide(); Form1 form = new Form1(); form.ShowDialog(); this.Close(); } else { IniFunc.writeString("ReCPU", "ClearMode", "false", ApplicationData + @"\ReCPU\Settings.ini"); this.Hide(); Form1 form = new Form1(); form.ShowDialog(); this.Close(); } }