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); } }
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); } }