From 8e2cbf02b6c819e92ee4eec2a673586438edfa93 Mon Sep 17 00:00:00 2001 From: Roy Date: Mon, 5 Mar 2018 09:12:59 +0200 Subject: Some work on embroidery import/export. --- .../Embroidery/Tango.EmbroideryUI/EmbroideryFileEditor.xaml.cs | 1 + .../Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryPath.cs | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Embroidery') diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryFileEditor.xaml.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryFileEditor.xaml.cs index 9d7475aea..1ed1e5b18 100644 --- a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryFileEditor.xaml.cs +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryFileEditor.xaml.cs @@ -215,6 +215,7 @@ namespace Tango.EmbroideryUI { path.PathFigure.Segments.Add(new LineSegment(new Point(_currentPoint.X, _currentPoint.Y), true)); path.Length += Math.Abs(GetDistance(_lastStitch.XX, _lastStitch.YY, stitch.XX, stitch.YY)); + path.StitchCount++; } _mode = StitchFlag.Normal; break; diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryPath.cs b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryPath.cs index 385266228..5999845bf 100644 --- a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryPath.cs +++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/EmbroideryPath.cs @@ -37,7 +37,13 @@ namespace Tango.EmbroideryUI public static readonly DependencyProperty PathFigureProperty = DependencyProperty.Register("PathFigure", typeof(PathFigure), typeof(EmbroideryPath), new PropertyMetadata(null)); - + public int StitchCount + { + get { return (int)GetValue(StitchCountProperty); } + set { SetValue(StitchCountProperty, value); } + } + public static readonly DependencyProperty StitchCountProperty = + DependencyProperty.Register("StitchCount", typeof(int), typeof(EmbroideryPath), new PropertyMetadata(0)); private void OnBrushChanged() { -- cgit v1.3.1