Пример #1
0
 /// <summary>
 /// Add a RadioButton to this RadioGroup
 /// </summary>
 /// <param name="radio">RadioButton</param>
 public void AddRadioButton(RadioButton radio)
 {
     if (this.RadioButtons != null)
     {
         if (this.RadioButtons.Contains(radio) == false)
         {
             this.RadioButtons.Add(radio);
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Delete the RadioButton from the RadioGroup
 /// </summary>
 /// <param name="radio">RadioButton</param>
 public void DeleteRadioButton(RadioButton radio)
 {
     if (this.RadioButtons != null)
     {
         if (this.RadioButtons.Contains(radio) == true)
         {
             this.RadioButtons.Remove(radio);
             radio.Dispose();
         }
     }
 }
Пример #3
0
 /// <summary>
 /// Initialise RadioGroup with one RadioButton
 /// </summary>
 /// <param name="parent">Parent Window</param>
 /// <param name="_firstRadio">One RadioButton</param>
 public RadioGroup(Window parent, RadioButton _firstRadio)
     : base(parent)
 {
     this.Enabled = true;
     this.Visible = true;
     this.Placement = RadioButtonPlacement.Vertical;
     this.RadioButtons = new List<RadioButton>();
     this.AddRadioButton(_firstRadio);
     this.Parent.AddControl(this);
 }