예제 #1
0
 public IControl AddControl(IControl control)
 {
     if (HasControl(control))
         throw new InvalidOperationException("Cannot add a control more than once.");
     control.Enable();
     _controls.Add(control);
     control.Show();
     return control;
 }
예제 #2
0
 public IControl AddControl(IControl control)
 {
     if (HasControl(control))
     {
         throw new InvalidOperationException("Cannot add a control more than once.");
     }
     control.Enable();
     _controls.Add(control);
     control.Show();
     return(control);
 }