public CanvasMouseButtonEventArgs(MouseButtonEventArgs e, CADPadCanvas parent) : base(e, parent)
        {
            if (e.ChangedButton == System.Windows.Input.MouseButton.Left)
            {
                ChangedButton = MouseButton.Left;
            }
            if (e.ChangedButton == System.Windows.Input.MouseButton.Right)
            {
                ChangedButton = MouseButton.Right;
            }
            if (e.ChangedButton == System.Windows.Input.MouseButton.Middle)
            {
                ChangedButton = MouseButton.Middle;
            }
            if (e.ChangedButton == System.Windows.Input.MouseButton.XButton1)
            {
                ChangedButton = MouseButton.XButton1;
            }
            if (e.ChangedButton == System.Windows.Input.MouseButton.XButton2)
            {
                ChangedButton = MouseButton.XButton2;
            }

            if (e.ButtonState == System.Windows.Input.MouseButtonState.Pressed)
            {
                ButtonState = MouseButtonState.Pressed;
            }
            if (e.ButtonState == System.Windows.Input.MouseButtonState.Released)
            {
                ButtonState = MouseButtonState.Released;
            }
        }
예제 #2
0
        private static void On_GeometryToCreate_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CADPadCanvas dh = d as CADPadCanvas;

            if (dh != null)
            {
                dh.On_GeometryToCreate_Changed();
            }
        }
예제 #3
0
 public CanvasMouseEventArgs(MouseEventArgs e, CADPadCanvas parent)
 {
     _parent   = parent;
     InnerArgs = e;
 }
예제 #4
0
 public CanvasKeyEventArgs(KeyEventArgs e, CADPadCanvas parent)
 {
     _parent   = parent;
     InnerArgs = e;
 }
예제 #5
0
 public CanvasMouseWheelEventArgs(MouseWheelEventArgs e, CADPadCanvas parent) : base(e, parent)
 {
     Delta = e.Delta;
 }