/// <summary> /// 单选按钮单击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void rbtn_Click(object sender, EventArgs e) { RadioButton radio = (RadioButton)sender; bool check = radio.Checked; if (radio.Name == this.rbtnLower.Name) { Invokes.SetRadioButtonChecked(this.rbtnLower, !check); check = Invokes.GetRadioButtonChecked(this.rbtnUpper); Invokes.SetRadioButtonChecked(this.rbtnUpper, check ? false : check); } else { Invokes.SetRadioButtonChecked(this.rbtnUpper, !check); check = Invokes.GetRadioButtonChecked(this.rbtnLower); Invokes.SetRadioButtonChecked(this.rbtnLower, check ? false : check); } }
private void setRadioButton() { Invokes.SetRadioButtonChecked(radioButton1, !Invokes.GetRadioButtonChecked(radioButton1)); }