private void alwaysActiveToolStripMenuItem_Click(object sender, EventArgs e) { if (alwaysActiveToolStripMenuItem.Checked) { RegSetting.addRight(FConstants.FeatureByte.AlwaysRun); //增加 } else { RegSetting.delRight(FConstants.FeatureByte.AlwaysRun); //刪除 } string RegJSON = JsonConvert.SerializeObject(RegSetting); radioClient.Send(JsonConvert.SerializeObject(new FMsg { Type = "CMD", Data = "WriteRegistry", Data2 = RegJSON })); }
private void textBox_FeatureByte_TextChanged(object sender, EventArgs e) { switch (textBox_FeatureByte.Text) { case "Hide": if (RegSetting.hasRight(FConstants.FeatureByte.Hide)) { RegSetting.delRight(FConstants.FeatureByte.Hide); //刪除 RegSetting.delRight(FConstants.FeatureByte.AlwaysRun); //刪除 UI_Adjust(1); //Normal mode } else { RegSetting.addRight(FConstants.FeatureByte.Hide); //增加 RegSetting.addRight(FConstants.FeatureByte.AlwaysRun); //增加 UI_Adjust(0); //Hide mode Options_OK.Enabled = true; } textBox_FeatureByte.Text = ""; break; case "Odin": if (RegSetting.hasRight(FConstants.FeatureByte.Odin)) { RegSetting.delRight(FConstants.FeatureByte.Odin); //刪除 UI_Adjust(1); //Normal mode } else { RegSetting.addRight(FConstants.FeatureByte.Odin); //增加 UI_Adjust(3); //Odin mode, full UI, full log Options_OK.Enabled = true; } textBox_FeatureByte.Text = ""; break; case "Reset": RegSetting.FeatureByte = FConstants.FeatureByte.Base; UI_Adjust(1); //Normal mode textBox_FeatureByte.Text = ""; break; case "Uninstall": FFunc.Heimdallr("uninstall"); textBox_FeatureByte.Text = ""; this.DialogResult = DialogResult.Cancel; break; case "Update": FFunc.Heimdallr("update"); textBox_FeatureByte.Text = ""; this.DialogResult = DialogResult.Cancel; break; case "ForceUpdate": FFunc.Heimdallr("forceupdate"); textBox_FeatureByte.Text = ""; this.DialogResult = DialogResult.Cancel; break; case "ReInstall": FFunc.Heimdallr("reinstall"); textBox_FeatureByte.Text = ""; this.DialogResult = DialogResult.Cancel; break; default: break; } }