private void _globalCheck_CheckedChanged(object sender, EventArgs e) { if (constant) { return; } parentTabPage.SaveUndoAction(new ActionStack(this, 3, Visible)); Visible = ((CheckBox)sender).Checked; }
public static void Init(Control origin, Control target, InnerTabPage _parent) { parent = _parent; controlAligment = new ControlAligment(parent.GetDesktopPanel()); moving = false; scaling = false; bottomEdge = false; upperEdge = false; leftEdge = false; rightEdge = false; cursorOrigin = Point.Empty; origin.Click += (sender, e) => { ((InnerControl)target).FillPropPanel(parent.GetPropertiesPanel()); }; origin.MouseDown += Control_MouseDown; // Активировать изменение объекта origin.MouseUp += Control_MouseUp; // Прекратить изменение объекта origin.MouseDown += (sender, e) => { startLocation = target.Location; }; origin.MouseUp += (sender, e) => { if (((Control)sender).Location != startLocation) { parent.SaveUndoAction(new ActionStack((InnerControl)target, 1, startLocation)); } }; origin.MouseMove += (sender, e) => MoveControl(target, e); // Само изменение рассчитывается здесь }