Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
        /// <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);
            }
        }
Exemplo n.º 3
0
        /// <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);
        }
Exemplo n.º 4
0
 /// <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);
      }
 }
Exemplo n.º 5
0
        /// <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);
             }
        }
Exemplo n.º 6
0
        /// <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);
        }
Exemplo n.º 7
0
        /// <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);
        }
Exemplo n.º 8
0
        /// <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);
        }