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); // Само изменение рассчитывается здесь }
public ClickerInput(InnerTabPage parentTabPage) { InitializeComponent(); this.parentTabPage = parentTabPage; richTextBox1.Text = parentTabPage.activeElement.clicker; FormClosed += ClickerInput_FormClosed; Resize += ClickerInput_Resize; }
private void DeleteActiveElement() { if (tabControl1.SelectedIndex < 0) { return; } InnerTabPage innerTabPage = GetActivePage(); if (innerTabPage.activeElement != null) { innerTabPage.DeleteActiveElement(); } }
private TabPage MakeNewTabPage() { InnerTabPage innerTabPage = new InnerTabPage(); innerTabPage.Dock = DockStyle.Fill; TabPage tabPage = new TabPage(); tabPage.Controls.Add(innerTabPage); tabPage.Text = "Безымянный"; return(tabPage); }
public InnerControl(InnerTabPage parentTabPage) { InitializeComponent(); this.parentTabPage = parentTabPage; elementName = this.GetType().ToString() + "_" + DateTime.Now + "_" + DateTime.Now.Millisecond; clicker = ""; elementY = 0; constant = false; hidden = false; //propPanelCleared = false; Disposed += InnerControl_Disposed; this.explorerPainter = parentTabPage.explorerPainter; this._params = parentTabPage._params; }
private void CloneActiveElement() { if (tabControl1.SelectedIndex < 0) { return; } InnerTabPage innerTabPage = GetActivePage(); if (innerTabPage.activeElement == null) { return; } try { InnerControl copy = innerTabPage.activeElement.MakeCopy(); innerTabPage.AddElement(copy); copy.BringToFront(); } catch (ArgumentOutOfRangeException) { } }
public CloseButton(InnerTabPage parentTabPage) : base(parentTabPage) { InitializeComponent(); Initialization(); }
public InvSlot(InnerTabPage parentTabPage) : base(parentTabPage) { InitializeComponent(); Initialization(); }
public Params(InnerTabPage innerTabPage) { this.innerTabPage = innerTabPage; AllToDefault(); }
public JSONParser(Params _params, ExplorerPainter explorerPainter, InnerTabPage parentTabPage) { this.parentTabPage = parentTabPage; this._params = _params; this.explorerPainter = explorerPainter; }
public static void Init(Control origin, InnerTabPage _parent) { Init(origin, origin, _parent); }