개정판 37eadd3f
Fix: ArcControl, ArrowArcControl, ArrowControl_Multi, LineControl, TriControl에 대해서 Undo 작업 진행
Change-Id: I2bca1618da4fd9cf9a59cc6bb2db1f194264ab7f
MarkupToPDF/Controls/Line/ArcControl.cs | ||
---|---|---|
19 | 19 |
namespace MarkupToPDF.Controls.Line |
20 | 20 |
{ |
21 | 21 |
|
22 |
public class ArcControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IMarkupCommonData, IDashControl
|
|
22 |
public class ArcControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IDashControl |
|
23 | 23 |
{ |
24 | 24 |
#region 초기선언 |
25 | 25 |
public event PropertyChangedEventHandler PropertyChanged; |
... | ... | |
41 | 41 |
//this.DefaultStyleKey = typeof(ArcControl); |
42 | 42 |
} |
43 | 43 |
|
44 |
public override void Copy(CommentUserInfo lhs) |
|
45 |
{ |
|
46 |
if (lhs is ArcControl ArcCtrl) |
|
47 |
{ |
|
48 |
this.StartPoint = new Point(ArcCtrl.StartPoint.X, ArcCtrl.StartPoint.Y); |
|
49 |
this.EndPoint = new Point(ArcCtrl.EndPoint.X, ArcCtrl.EndPoint.Y); |
|
50 |
this.DashSize = ArcCtrl.DashSize; |
|
51 |
this.PointSet = ArcCtrl.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
52 |
this.isTransOn = ArcCtrl.isTransOn; |
|
53 |
this.MidPoint = new Point(ArcCtrl.MidPoint.X, ArcCtrl.MidPoint.Y); |
|
54 |
this.StrokeColor = ArcCtrl.StrokeColor; |
|
55 |
this.Opacity = ArcCtrl.Opacity; |
|
56 |
this.Clock = ArcCtrl.Clock; |
|
57 |
this.LineSize = ArcCtrl.LineSize; |
|
58 |
this.UserID = ArcCtrl.UserID; |
|
59 |
this.Memo = ArcCtrl.Memo; |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
63 |
public override CommentUserInfo Clone() |
|
64 |
{ |
|
65 |
var clone = new ArcControl(); |
|
66 |
clone.Copy(this); |
|
67 |
return clone; |
|
68 |
} |
|
69 |
|
|
44 | 70 |
public void Dispose() |
45 | 71 |
{ |
46 | 72 |
//GC.Collect(); |
MarkupToPDF/Controls/Line/ArrowArcControl.cs | ||
---|---|---|
19 | 19 |
namespace MarkupToPDF.Controls.Line |
20 | 20 |
{ |
21 | 21 |
|
22 |
public class ArrowArcControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IMarkupCommonData, IDashControl
|
|
22 |
public class ArrowArcControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IDashControl |
|
23 | 23 |
{ |
24 | 24 |
#region 초기선언 |
25 | 25 |
public event PropertyChangedEventHandler PropertyChanged; |
... | ... | |
41 | 41 |
//this.DefaultStyleKey = typeof(ArrowArcControl); |
42 | 42 |
} |
43 | 43 |
|
44 |
public override void Copy(CommentUserInfo lhs) |
|
45 |
{ |
|
46 |
if (lhs is ArrowArcControl ArrowArcCtrl) |
|
47 |
{ |
|
48 |
this.StartPoint = new Point(ArrowArcCtrl.StartPoint.X, ArrowArcCtrl.StartPoint.Y); |
|
49 |
this.EndPoint = new Point(ArrowArcCtrl.EndPoint.X, ArrowArcCtrl.EndPoint.Y); |
|
50 |
this.DashSize = ArrowArcCtrl.DashSize; |
|
51 |
this.PointSet = ArrowArcCtrl.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
52 |
this.isTransOn = ArrowArcCtrl.isTransOn; |
|
53 |
this.MiddlePoint = new Point(ArrowArcCtrl.MiddlePoint.X, ArrowArcCtrl.MiddlePoint.Y); |
|
54 |
this.StrokeColor = ArrowArcCtrl.StrokeColor; |
|
55 |
this.Opacity = ArrowArcCtrl.Opacity; |
|
56 |
|
|
57 |
this.Clock = ArrowArcCtrl.Clock; |
|
58 |
this.LineSize = ArrowArcCtrl.LineSize; |
|
59 |
this.UserID = ArrowArcCtrl.UserID; |
|
60 |
this.Memo = ArrowArcCtrl.Memo; |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 |
public override CommentUserInfo Clone() |
|
65 |
{ |
|
66 |
var clone = new ArrowArcControl(); |
|
67 |
clone.Copy(this); |
|
68 |
return clone; |
|
69 |
} |
|
70 |
|
|
44 | 71 |
public void Dispose() |
45 | 72 |
{ |
46 | 73 |
//GC.Collect(); |
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs | ||
---|---|---|
18 | 18 |
|
19 | 19 |
namespace MarkupToPDF.Controls.Line |
20 | 20 |
{ |
21 |
public class ArrowControl_Multi : CommentUserInfo, IDisposable, INotifyPropertyChanged, IMarkupCommonData, IDashControl
|
|
21 |
public class ArrowControl_Multi : CommentUserInfo, IDisposable, INotifyPropertyChanged, IDashControl |
|
22 | 22 |
{ |
23 | 23 |
|
24 | 24 |
public event PropertyChangedEventHandler PropertyChanged; |
... | ... | |
39 | 39 |
{ |
40 | 40 |
//this.DefaultStyleKey = typeof(ArrowControl_Multi); |
41 | 41 |
} |
42 |
|
|
42 |
|
|
43 |
public override void Copy(CommentUserInfo lhs) |
|
44 |
{ |
|
45 |
if (lhs is ArrowControl_Multi item) |
|
46 |
{ |
|
47 |
this.LineSize = item.LineSize; |
|
48 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
49 |
this.MiddlePoint = new Point(item.MiddlePoint.X, item.MiddlePoint.Y); |
|
50 |
this.DashSize = item.DashSize; |
|
51 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
52 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
53 |
this.Opacity = item.Opacity; |
|
54 |
this.StrokeColor = item.StrokeColor; |
|
55 |
this.UserID = item.UserID; |
|
56 |
this.Memo = item.Memo; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
public override CommentUserInfo Clone() |
|
61 |
{ |
|
62 |
var clone = new ArrowControl_Multi(); |
|
63 |
clone.Copy(this); |
|
64 |
return clone; |
|
65 |
} |
|
66 |
|
|
43 | 67 |
#region Dependency Properties |
44 | 68 |
|
45 | 69 |
public static readonly DependencyProperty IsSelectedProperty = |
MarkupToPDF/Controls/Line/LineControl.cs | ||
---|---|---|
19 | 19 |
namespace MarkupToPDF.Controls.Line |
20 | 20 |
{ |
21 | 21 |
[TemplatePart(Name = "PART_LinePath", Type = typeof(Path))] |
22 |
public class LineControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IMarkupCommonData, IDashControl
|
|
22 |
public class LineControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IDashControl |
|
23 | 23 |
{ |
24 | 24 |
public event PropertyChangedEventHandler PropertyChanged; |
25 | 25 |
|
... | ... | |
55 | 55 |
//this.DefaultStyleKey = typeof(LineControl); |
56 | 56 |
} |
57 | 57 |
|
58 |
public override void Copy(CommentUserInfo lhs) |
|
59 |
{ |
|
60 |
if (lhs is LineControl item) |
|
61 |
{ |
|
62 |
this.LineStyleSet = item.LineStyleSet; |
|
63 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
64 |
this.DimSize = item.DimSize; |
|
65 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
66 |
this.DashSize = item.DashSize; |
|
67 |
this.Interval = item.Interval; |
|
68 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
69 |
this.Opacity = item.Opacity; |
|
70 |
this.StrokeColor = item.StrokeColor; |
|
71 |
this.UserID = item.UserID; |
|
72 |
this.LineSize = item.LineSize; |
|
73 |
} |
|
74 |
} |
|
75 |
|
|
76 |
public override CommentUserInfo Clone() |
|
77 |
{ |
|
78 |
var clone = new LineControl(); |
|
79 |
clone.Copy(this); |
|
80 |
return clone ; |
|
81 |
} |
|
82 |
|
|
58 | 83 |
public void Dispose() |
59 | 84 |
{ |
60 | 85 |
//GC.Collect(); |
MarkupToPDF/Controls/Shape/TriControl.cs | ||
---|---|---|
19 | 19 |
namespace MarkupToPDF.Controls.Shape |
20 | 20 |
{ |
21 | 21 |
//[TemplatePart(Name = "PART_TriPath", Type = typeof(Path))] |
22 |
public class TriControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IPath, IMarkupCommonData, IShapeControl, IDashControl
|
|
22 |
public class TriControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IShapeControl, IDashControl |
|
23 | 23 |
{ |
24 | 24 |
public Path Base_TriPath { get; set; } |
25 | 25 |
//public enum PaintSet { None, Fill, Hatch }; |
... | ... | |
35 | 35 |
//Application.Current.Resources.MergedDictionaries.Add(dictionary); |
36 | 36 |
} |
37 | 37 |
|
38 |
public override void Copy(CommentUserInfo lhs) |
|
39 |
{ |
|
40 |
if(lhs is TriControl item) |
|
41 |
{ |
|
42 |
this.LineSize = item.LineSize; |
|
43 |
this.MidPoint = new Point(item.MidPoint.X, item.MidPoint.Y); |
|
44 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
45 |
this.Paint = item.Paint; |
|
46 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
47 |
this.Opacity = item.Opacity; |
|
48 |
this.CommentAngle = item.CommentAngle; |
|
49 |
this.DashSize = item.DashSize; |
|
50 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
51 |
this.StrokeColor = item.StrokeColor; |
|
52 |
this.UserID = item.UserID; |
|
53 |
this.Memo = item.Memo; |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
public override CommentUserInfo Clone() |
|
58 |
{ |
|
59 |
var clone = new TriControl(); |
|
60 |
clone.Copy(this); |
|
61 |
return clone; |
|
62 |
} |
|
63 |
|
|
38 | 64 |
#region Dependency Properties |
39 | 65 |
|
40 | 66 |
public static readonly DependencyProperty OverViewPathDataProperty = DependencyProperty.Register( |
내보내기 Unified diff