internal static void InvokeDragEvent(object sender, DockEventArgs e) { if (dragEvent != null) { dragEvent(sender, e); } if (!e.ShowDockGuide) { HideDockGuide(); } }
internal DockContainer SendDockEvent(bool confirm) { DockEventArgs e = new DockEventArgs(new Point(Control.MousePosition.X, Control.MousePosition.Y), this.rootContainer.DockType, confirm); DockManager.InvokeDragEvent(this, e); if (e.Release) { DockManager.HideDockGuide(); } return(e.Target); }
internal static void UpdateDockGuide(DockContainer target, DockEventArgs e) { if ((((target == null) | noGuidePlease) | (DockManager.style != DockVisualStyle.VS2005)) | fastMoveDraw) { HideDockGuide(); } else { if (dockGuide == null) { dockGuide = new OverlayForm(); } Size size = dockGuide.Size; Point location = dockGuide.Location; dockGuide.TargetHost = target; dockGuide.Size = target.Size; if (!dockGuide.Visible) { dockGuide.Show(); } if (target.Parent != null) { dockGuide.Location = target.RectangleToScreen(target.ClientRectangle).Location; } else { dockGuide.Location = target.Location; } if ((dockGuide.Location != location) || (dockGuide.Size != size)) { dockGuide.Invalidate(); } dockGuide.BringToFront(); DockStyle style = dockGuide.HitTest(e.Point); if (style != DockStyle.None) { e.Point = target.GetVirtualDragDest(style); } else { e.Handled = true; } e.ShowDockGuide = true; } }