private void IC_MouseDown(object sender, CancelMouseEventArgs e) { if (Root.Snapping == 1) { Root.SnappingX = e.X; Root.SnappingY = e.Y; Root.SnappingRect = new Rectangle(e.X, e.Y, 0, 0); Root.Snapping = 2; } }
/// <summary> /// Occurs before the submenu gets shown allowing you to cancel it. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The event data with information about the type.</param> private void ContextMenu_BeforePopup(object sender, CancelMouseEventArgs e) { if (this.dockingManager1.ActiveControl == serverExplorer) { e.Cancel = true; } else { e.Cancel = false; } }
private void IC_MouseMove(object sender, CancelMouseEventArgs e) { if (Root.Snapping == 2) { int left = Math.Min(Root.SnappingX, e.X); int top = Math.Min(Root.SnappingY, e.Y); int width = Math.Abs(Root.SnappingX - e.X); int height = Math.Abs(Root.SnappingY - e.Y); Root.SnappingRect = new Rectangle(left, top, width, height); } }
/// <summary> /// on mouseMove, toggle the main ink overlay. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void co_MouseMove(object sender, CancelMouseEventArgs e) { if (basicform.toggleOverlay()) { buttonform.OverlayOn.Text = "Turn Overlay Off"; buttonform.OverlayOn.BackColor = SystemColors.Control; } else { buttonform.OverlayOn.Text = "Turn Overlay On"; buttonform.OverlayOn.BackColor = Color.Red; } }
private void IC_MouseDown(object sender, CancelMouseEventArgs e) { if (Root.gpPenWidthVisible) { Root.gpPenWidthVisible = false; Root.UponSubPanelUpdate = true; } Root.FingerInAction = true; if (Root.Snapping == 1) { Root.SnappingX = e.X; Root.SnappingY = e.Y; Root.SnappingRect = new Rectangle(e.X, e.Y, 0, 0); Root.Snapping = 2; } }
private void IC_MouseUp(object sender, CancelMouseEventArgs e) { if (Root.Snapping == 2) { int left = Math.Min(Root.SnappingX, e.X); int top = Math.Min(Root.SnappingY, e.Y); int width = Math.Abs(Root.SnappingX - e.X); int height = Math.Abs(Root.SnappingY - e.Y); if (width < 5 || height < 5) { left = 0; top = 0; width = this.Width; height = this.Height; } Root.SnappingRect = new Rectangle(left, top, width, height); Root.UponTakingSnap = true; ExitSnapping(); } }
private void IC_MouseUp(object sender, CancelMouseEventArgs e) { if (Root.Snapping == 2) { int left = Math.Min(Root.SnappingX, e.X); int top = Math.Min(Root.SnappingY, e.Y); int width = Math.Abs(Root.SnappingX - e.X); int height = Math.Abs(Root.SnappingY - e.Y); if (width < 5 || height < 5) { left = 0; top = 0; width = this.Width; height = this.Height; } Root.SnappingRect = new Rectangle(left, top, width, height); Root.UponTakingSnap = true; ExitSnapping(); } }
private void IC_MouseMove(object sender, CancelMouseEventArgs e) { if (Root.Snapping == 2) { int left = Math.Min(Root.SnappingX, e.X); int top = Math.Min(Root.SnappingY, e.Y); int width = Math.Abs(Root.SnappingX - e.X); int height = Math.Abs(Root.SnappingY - e.Y); Root.SnappingRect = new Rectangle(left, top, width, height); } }
private void IC_MouseDown(object sender, CancelMouseEventArgs e) { if (Root.Snapping == 1) { Root.SnappingX = e.X; Root.SnappingY = e.Y; Root.SnappingRect = new Rectangle(e.X, e.Y, 0, 0); Root.Snapping = 2; } }