Пример #1
0
        public void MouseMove(MainWindow main, MouseEventArgs e)
        {
            if (isOptionsDialogShown)
            {
                main.ReleaseMouseCapture();
                return;
            }
            if (Settings.Default.MouseDraw && main.IsMouseCaptured == false)
            {
                main.CaptureMouse();
            }

            Debug.WriteLine(String.Format("MouseMove! {0} {1} {2}", Settings.Default.MouseDraw, main.IsMouseCaptured, isOptionsDialogShown));

            if (isDrawing || Settings.Default.MouseDraw)
            {
                MouseDraw(main, e.GetPosition(main));
            }

            //Cheesy, but hotkeys are ignored when the mouse is captured.
            // However, if we don't capture and release, the shapes will draw forever.
            if (Settings.Default.MouseDraw && main.IsMouseCaptured)
            {
                main.ReleaseMouseCapture();
            }
        }
Пример #2
0
 public void MouseUp(MainWindow main, MouseButtonEventArgs e)
 {
     isDrawing = false;
     if (Settings.Default.MouseDraw)
     {
         return;
     }
     main.ReleaseMouseCapture();
 }
Пример #3
0
 public void MouseUp(MainWindow main, MouseButtonEventArgs e)
 {
     isDrawing = false;
      if (Settings.Default.MouseDraw) return;
      main.ReleaseMouseCapture();
 }
Пример #4
0
        public void MouseMove(MainWindow main, MouseEventArgs e)
        {
            if (isOptionsDialogShown)
              {
              main.ReleaseMouseCapture();
              return;
              }
              if (Settings.Default.MouseDraw && main.IsMouseCaptured == false)
            main.CaptureMouse();

              Debug.WriteLine(String.Format("MouseMove! {0} {1} {2}", Settings.Default.MouseDraw, main.IsMouseCaptured, isOptionsDialogShown));

             if (isDrawing || Settings.Default.MouseDraw)
             {
            MouseDraw(main, e.GetPosition(main));
             }

             //Cheesy, but hotkeys are ignored when the mouse is captured.
             // However, if we don't capture and release, the shapes will draw forever.
             if (Settings.Default.MouseDraw && main.IsMouseCaptured)
            main.ReleaseMouseCapture();
        }