private void radioAoff_CheckedChanged(System.Object sender, System.EventArgs e) { RadioButton b = (RadioButton)sender; if (b.Parent == null) { return; } GroupBox g = (GroupBox)b.Parent; string t = g.Tag.ToString(); switch (b.Tag.ToString()) { case "off": WNOpt.opt(t).flag = false; WNOpt.opt(t.ToUpper()).flag = false; break; case "on": WNOpt.opt(t).flag = true; WNOpt.opt(t.ToUpper()).flag = false; break; case "ON": WNOpt.opt(t).flag = true; WNOpt.opt(t.ToUpper()).flag = true; break; } }
private void RBInit(string t, RadioButton a, RadioButton b, RadioButton c) { bool v = WNOpt.opt(t).flag; bool V1 = WNOpt.opt(t.ToUpper()).flag; if ((v)) { if ((V1)) { c.Checked = true; } else { b.Checked = true; } } else if (!V1) { a.Checked = true; } }