示例#1
0
 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);
 }
示例#2
0
 private bool LeftButtonIsPressed(Microsoft.Msagl.Drawing.MouseButtons mouseButtons)
 {
     return((mouseButtons & Microsoft.Msagl.Drawing.MouseButtons.Left) == Microsoft.Msagl.Drawing.MouseButtons.Left);
 }
示例#3
0
 static bool MiddleButtonIsPressed(Microsoft.Msagl.Drawing.MouseButtons mouseButtons)
 {
     return((mouseButtons & Microsoft.Msagl.Drawing.MouseButtons.Middle) == Microsoft.Msagl.Drawing.MouseButtons.Middle);
 }