private TestDrop ( IDockDragSource dragSource, |
||
dragSource | IDockDragSource | |
dockOutline | ||
return | void |
private void TestDrop() { if (Outline == null || Indicator == null || Indicator.IsDisposed) { return; } Outline.FlagTestDrop = false; Indicator.FullPanelEdge = ((Control.ModifierKeys & Keys.Shift) != 0); if ((Control.ModifierKeys & Keys.Control) == 0) { Indicator.TestDrop(); if (!Outline.FlagTestDrop) { DockPane pane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel); if (pane != null && DragSource.IsDockStateValid(pane.DockState)) { pane.TestDrop(DragSource, Outline); } } if (!Outline.FlagTestDrop && DragSource.IsDockStateValid(DockState.Float)) { FloatWindow floatWindow = DockHelper.FloatWindowAtPoint(Control.MousePosition, DockPanel); if (floatWindow != null) { floatWindow.TestDrop(DragSource, Outline); } } } else { Indicator.DockPane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel); } if (!Outline.FlagTestDrop) { if (DragSource.IsDockStateValid(DockState.Float)) { Rectangle rect = FloatOutlineBounds; rect.Offset(Control.MousePosition.X - StartMousePosition.X, Control.MousePosition.Y - StartMousePosition.Y); Outline.Show(rect); } } if (!Outline.FlagTestDrop) { Cursor.Current = Cursors.No; Outline.Show(); } else { Cursor.Current = DragControl.Cursor; } }
private void TestDrop() { this.Outline.FlagTestDrop = false; this.Indicator.FullPanelEdge = ((ModifierKeys & Keys.Shift) != 0); if ((ModifierKeys & Keys.Control) == 0) { this.Indicator.TestDrop(); if (!this.Outline.FlagTestDrop) { DockPane pane = DockHelper.PaneAtPoint(MousePosition, this.DockPanel); if (pane != null && this.DragSource.IsDockStateValid(pane.DockState)) { pane.TestDrop(this.DragSource, this.Outline); } } if (!this.Outline.FlagTestDrop && this.DragSource.IsDockStateValid(DockState.Float)) { FloatWindow floatWindow = DockHelper.FloatWindowAtPoint(MousePosition, this.DockPanel); if (floatWindow != null) { floatWindow.TestDrop(this.DragSource, this.Outline); } } } else { this.Indicator.DockPane = DockHelper.PaneAtPoint(MousePosition, this.DockPanel); } if (!this.Outline.FlagTestDrop) { if (this.DragSource.IsDockStateValid(DockState.Float)) { Rectangle rect = this.FloatOutlineBounds; rect.Offset(MousePosition.X - this.StartMousePosition.X, MousePosition.Y - this.StartMousePosition.Y); this.Outline.Show(rect); } } if (!this.Outline.FlagTestDrop) { Cursor.Current = Cursors.No; this.Outline.Show(); } else { Cursor.Current = this.DragControl.Cursor; } }