public MoveTool(PathTool pathTool) { PathTool = pathTool; }
public override void LeftDown(IToolContext context, double x, double y, Modifier modifier) { base.LeftDown(context, x, y, modifier); PathTool.Move(); }
private void SwitchPathTool(double x, double y) { switch (_previousPathTool) { case PathTool.Line: { RemoveLastSegment <XLineSegment>(); _toolPathLine.Remove(); } break; case PathTool.Arc: { RemoveLastSegment <XArcSegment>(); _toolPathArc.Remove(); } break; case PathTool.CubicBezier: { RemoveLastSegment <XCubicBezierSegment>(); _toolPathCubicBezier.Remove(); } break; case PathTool.QuadraticBezier: { RemoveLastSegment <XQuadraticBezierSegment>(); _toolPathQuadraticBezier.Remove(); } break; case PathTool.Move: break; } switch (_editor.CurrentPathTool) { case PathTool.Line: { _toolPathLine.LeftDown(x, y); } break; case PathTool.Arc: { _toolPathArc.LeftDown(x, y); } break; case PathTool.CubicBezier: { _toolPathCubicBezier.LeftDown(x, y); } break; case PathTool.QuadraticBezier: { _toolPathQuadraticBezier.LeftDown(x, y); } break; case PathTool.Move: { _editor.Project.CurrentContainer.WorkingLayer.Invalidate(); _editor.Project.CurrentContainer.HelperLayer.Invalidate(); } break; } if (_editor.CurrentPathTool == PathTool.Move) { _movePathTool = _previousPathTool; } _previousPathTool = _editor.CurrentPathTool; }