private void SelectRadioButton(MyChoices choiceID) { RadioButton button; this.radButtons.TryGetValue((int)choiceID, out button); button.Checked = true; }
private void SelectRadioButton(MyChoices value) { int buttonId = (int)value; RadioButton button; this.radButtons.TryGetValue(buttonId, out button); button.Checked = true; }
private void RadioButton_CheckedChanged(object sender, EventArgs e) { RadioButton button = sender as RadioButton; foreach (var item in this.radButtons) { if (item.Value == button) { this.choices = (MyChoices)item.Key; } } }