예제 #1
0
        public void OnMouseWheel(MouseEventArgs e)
        {
            double Factor;

            if (e.Delta > 0)
            {
                Factor = 1.0 / 1.1;
            }
            else if (e.Delta < 0)
            {
                Factor = 1.1;
            }
            else
            {
                return;
            }
            Rectangle    clr = canvas.ClientRectangle;
            BoundingRect rct = new BoundingRect(clr.Left, clr.Bottom, clr.Right, clr.Top);

            rct.Modify(screenToLayout);
            System.Drawing.Point p = new System.Drawing.Point(e.X, e.Y);
            p = canvas.PointToClient(Frame.UIService.CurrentMousePosition);
            GeoPoint2D p2 = screenToLayout * new GeoPoint2D(p.X, p.Y);

            rct.Right  = p2.x + (rct.Right - p2.x) * Factor;
            rct.Left   = p2.x + (rct.Left - p2.x) * Factor;
            rct.Bottom = p2.y + (rct.Bottom - p2.y) * Factor;
            rct.Top    = p2.y + (rct.Top - p2.y) * Factor;
            (this as IView).ZoomToRect(rct);
            (this as IView).InvalidateAll();
        }
예제 #2
0
 public void OnMouseDoubleClick(MouseEventArgs e)
 {
 }
예제 #3
0
 public void OnMouseDown(MouseEventArgs e)
 {
     Frame.ActionStack.OnMouseDown(e, this);
 }