Пример #1
0
    private void SelectRadioButton(MyChoices choiceID)
    {
        RadioButton button;

        this.radButtons.TryGetValue((int)choiceID, out button);
        button.Checked = true;
    }
Пример #2
0
    private void SelectRadioButton(MyChoices value)
    {
        int         buttonId = (int)value;
        RadioButton button;

        this.radButtons.TryGetValue(buttonId, out button);
        button.Checked = true;
    }
Пример #3
0
    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;
            }
        }
    }