示例#1
0
 public override void Start(object sender)
 {
     if (sender is Ellipse)
     {
         Ellipse     pointShape = (Ellipse)sender;
         HandlePoint point      = CanvasHolder.GetHandlePointByShape(pointShape);
         if (point is AnchorPoint)
         {
             CanvasHolder.SelectHandlePoint(point);
             moveAnchor = true;
             ProgressTimer.Start();
         }
     }
     else if (sender is Shape)
     {
         Shape       shape         = (Shape)sender;
         ShapeHolder shapeHolder   = CanvasHolder.GetShapeHolderByShape(shape);
         AnchorPoint anchorPoint   = shapeHolder.AnchorPoint;
         Point       mousePosition = Mouse.GetPosition(CanvasHolder.Canvas);
         if (anchorPoint == null)
         {
             anchorPoint             = new AnchorPoint(mousePosition, shapeHolder);
             shapeHolder.AnchorPoint = anchorPoint;
             CanvasHolder.SelectHandlePoint(anchorPoint);
             moveAnchor = true;
             ProgressTimer.Start();
         }
         else
         {
             position   = mousePosition;
             moveAnchor = false;
             ProgressTimer.Start();
         }
     }
 }
示例#2
0
        public override void Start(object sender)
        {
            if (sender is Ellipse)
            {
                Ellipse     pointShape        = (Ellipse)sender;
                HandlePoint activeHandlePoint = CanvasHolder.GetHandlePointByShape(pointShape);
                CanvasHolder.SelectHandlePoint(activeHandlePoint);

                ProgressTimer.Start();
            }
        }