예제 #1
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     this.is_dragging    = false;
     this.imminentAction = this.ImminentAction(e);
     Cursor.Current      = this.imminentAction.GetCursor(false);
     base.OnMouseUp(e);
 }
예제 #2
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     this.is_dragging    = true;
     this.drag_origin    = new Point(e.X, e.Y);
     this.imminentAction = this.ImminentAction(e);
     Cursor.Current      = this.imminentAction.GetCursor(true);
     base.OnMouseDown(e);
 }
예제 #3
0
 private ViewerControl.MouseAction ImminentAction(MouseEventArgs e)
 {
     ViewerControl.MouseAction mouseAction = null;
     if (this.userRegionViewController != null)
     {
         mouseAction = this.userRegionViewController.ImminentAction(e);
     }
     if (mouseAction == null)
     {
         mouseAction = new ViewerControl.DragImageAction(this);
     }
     return(mouseAction);
 }
예제 #4
0
 protected override void OnMouseMove(MouseEventArgs e)
 {
     if (this.baseLayer != null)
     {
         if (this.is_dragging)
         {
             Point diff = new Point(e.X - this.drag_origin.X, e.Y - this.drag_origin.Y);
             this.imminentAction.Dragged(diff);
             base.Invalidate();
             this.drag_origin = new Point(e.X, e.Y);
         }
         else
         {
             this.imminentAction = this.ImminentAction(e);
             Cursor.Current      = this.imminentAction.GetCursor(false);
         }
     }
     base.OnMouseMove(e);
 }
예제 #5
0
 protected override void OnMouseLeave(EventArgs e)
 {
     this.is_dragging    = false;
     this.imminentAction = new ViewerControl.NoAction();
     base.OnMouseLeave(e);
 }
예제 #6
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     this.is_dragging = false;
     this.imminentAction = this.ImminentAction(e);
     Cursor.Current = this.imminentAction.GetCursor(false);
     base.OnMouseUp(e);
 }
예제 #7
0
 protected override void OnMouseMove(MouseEventArgs e)
 {
     if (this.baseLayer != null)
     {
         if (this.is_dragging)
         {
             Point diff = new Point(e.X - this.drag_origin.X, e.Y - this.drag_origin.Y);
             this.imminentAction.Dragged(diff);
             base.Invalidate();
             this.drag_origin = new Point(e.X, e.Y);
         }
         else
         {
             this.imminentAction = this.ImminentAction(e);
             Cursor.Current = this.imminentAction.GetCursor(false);
         }
     }
     base.OnMouseMove(e);
 }
예제 #8
0
 protected override void OnMouseLeave(EventArgs e)
 {
     this.is_dragging = false;
     this.imminentAction = new ViewerControl.NoAction();
     base.OnMouseLeave(e);
 }
예제 #9
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     this.is_dragging = true;
     this.drag_origin = new Point(e.X, e.Y);
     this.imminentAction = this.ImminentAction(e);
     Cursor.Current = this.imminentAction.GetCursor(true);
     base.OnMouseDown(e);
 }