bool ToggleGroupElement(Microsoft.Msagl.Drawing.ModifierKeys modifierKeys, Microsoft.Msagl.Drawing.MouseButtons mouseButtons, bool dragging) { if (this.dragButton.IsChecked != null && this.dragButton.IsChecked.Value) { if (!dragging) { return(LeftButtonIsPressed(mouseButtons)); } else { return (((modifierKeys & Microsoft.Msagl.Drawing.ModifierKeys.Control) == Microsoft.Msagl.Drawing.ModifierKeys.Control) || ((modifierKeys & Microsoft.Msagl.Drawing.ModifierKeys.Shift) == Microsoft.Msagl.Drawing.ModifierKeys.Shift)); } } return(false); }
private bool LeftButtonIsPressed(Microsoft.Msagl.Drawing.MouseButtons mouseButtons) { return((mouseButtons & Microsoft.Msagl.Drawing.MouseButtons.Left) == Microsoft.Msagl.Drawing.MouseButtons.Left); }
static bool MiddleButtonIsPressed(Microsoft.Msagl.Drawing.MouseButtons mouseButtons) { return((mouseButtons & Microsoft.Msagl.Drawing.MouseButtons.Middle) == Microsoft.Msagl.Drawing.MouseButtons.Middle); }