Example #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();
         }
     }
 }
        public override void Start(object sender)
        {
            if (sender is Shape)
            {
                Shape  shape  = sender as Shape;
                Canvas canvas = CanvasHolder.Canvas;
                position    = Mouse.GetPosition(canvas);
                shapeHolder = CanvasHolder.GetShapeHolderByShape(shape);
                CanvasHolder.ActiveShapeHolder = shapeHolder;

                ProgressTimer.Start();
            }
        }