/// <summary> /// End window movement /// </summary> public void EndWindowMovement() { if (_movedWindow == null) { return; } Point screenLocation = Control.MousePosition; zAllowedDock allowedDock = _allowedDock; if (GetContainerUnderMouse(screenLocation) != null) { allowedDock = zAllowedDock.All; } GuidedDockResult result = _guider.GetDockResult(allowedDock, screenLocation); Control movedControl = _movedWindow; StopMovement(); _movedWindow = null; EventHandler <DockControlEventArgs> handler = ApplyDock; if (handler != null && result.Dock != DockStyle.None) { DockControlEventArgs args = new DockControlEventArgs(movedControl, result.Dock, result.DockMode); handler(this, args); } }
/// <summary> /// On set logical dock /// </summary> /// <param name="view">view</param> /// <param name="dock">dock</param> private void OnSetHostContainerDock(FormsTabbedView view, DockStyle dock) { EventHandler <DockControlEventArgs> handler = SetHostContainerDock; if (handler != null) { DockControlEventArgs args = new DockControlEventArgs(view, dock, zDockMode.Inner); handler(this, args); } }
/// <summary> /// On apply dock /// </summary> /// <param name="sender">sender of the event</param> /// <param name="e">event arguments</param> private void OnApplyDock(object sender, DockControlEventArgs e) { Point screenPoint = Control.MousePosition; DockableContainer containerToDock = (DockableContainer)e.Control; DockableContainer containerWhereToDock = null; if (e.DockMode == zDockMode.Inner) { containerWhereToDock = _guider.GetLeafDockedContainerFromPoint(screenPoint, e.Control); } _layout.DockControl(containerToDock, containerWhereToDock, e.Dock, e.DockMode); }
/// <summary> /// On set logical dock /// </summary> /// <param name="view">view</param> /// <param name="dock">dock</param> private void OnSetHostContainerDock(FormsTabbedView view, DockStyle dock) { EventHandler<DockControlEventArgs> handler = SetHostContainerDock; if (handler != null) { DockControlEventArgs args = new DockControlEventArgs(view, dock, zDockMode.Inner); handler(this, args); } }
/// <summary> /// End window movement /// </summary> public void EndWindowMovement() { if (_movedWindow == null) { return; } Point screenLocation = Control.MousePosition; zAllowedDock allowedDock = _allowedDock; if (GetContainerUnderMouse(screenLocation) != null) { allowedDock = zAllowedDock.All; } GuidedDockResult result = _guider.GetDockResult(allowedDock, screenLocation); Control movedControl = _movedWindow; StopMovement(); _movedWindow = null; EventHandler<DockControlEventArgs> handler = ApplyDock; if (handler != null && result.Dock != DockStyle.None) { DockControlEventArgs args = new DockControlEventArgs(movedControl, result.Dock, result.DockMode); handler(this, args); } }
/// <summary> /// On set logical dock /// </summary> /// <param name="sender">sender of the event</param> /// <param name="e">event arguments</param> private void OnSetHostContainerDock(object sender, DockControlEventArgs e) { FormsTabbedView view = (FormsTabbedView)e.Control; _layout.SetViewDock(view, e.Dock, view.CurrentDock, view.CurrentDockMode); }