Пример #1
0
 public static void SetEnabled(Control control, bool enabled)
 {
     if (control is Button || control is Label || control is PictureBox || control is Label || control is CheckBox || control is GroupBox)
     {
         ControlMover.Init(control);
     }
     foreach (Control child in control.Controls)
     {
         SetEnabled(child, enabled);
     }
 }
Пример #2
0
        public void EnableMoveResize(Control c)
        {
            c.Click += (sender, e) =>
            {
                if (this.SelectionChanged != null)
                {
                    this.SelectedControl = (Control)sender;
                    this.SelectionChanged(sender, e);
                }
            };

            ControlMover.Init(c, ControlMover.Direction.Any);
            new Resizer(c);
        }
 public static void SetEnabled(Control control, bool enabled)
 {
     if (control is Button || control is Label || control is PictureBox || control is Label || control is CheckBox || control is GroupBox)
     {
         if (control.Name != "buttonCloseSettings" && control.Name != "buttonResetSettings")
         {
             ControlMover.Init(control);
         }
     }
     foreach (Control child in control.Controls)
     {
         SetEnabled(child, enabled);
     }
 }