개정판 7b34fb3a
drawing control copy, clone 추가
Change-Id: I453efca38394beb691b91c3ad0ab288725668d77
MarkupToPDF/Controls/Etc/SymControl.cs | ||
---|---|---|
15 | 15 |
using MarkupToPDF.Serialize.Core; |
16 | 16 |
using MarkupToPDF.Serialize.S_Control; |
17 | 17 |
using System.Linq; |
18 |
using MarkupToPDF.Controls.Shape; |
|
19 |
using System.Windows.Markup; |
|
18 | 20 |
|
19 | 21 |
namespace MarkupToPDF.Controls.Etc |
20 | 22 |
{ |
... | ... | |
40 | 42 |
//Application.Current.Resources.MergedDictionaries.Add(dictionary); |
41 | 43 |
//System.Diagnostics.Debug.WriteLine("resource Count :" + Application.Current.Resources.MergedDictionaries.Count); |
42 | 44 |
} |
45 |
public override void Copy(CommentUserInfo lhs) |
|
46 |
{ |
|
47 |
if(lhs is SymControl symControl) |
|
48 |
{ |
|
49 |
this.LineSize = symControl.LineSize; |
|
50 |
this.PointSet = symControl.PointSet.ConvertAll(x => new System.Windows.Point(x.X, x.Y)); |
|
51 |
this.Paint = symControl.Paint; |
|
52 |
this.StartPoint = new System.Windows.Point(symControl.StartPoint.X, symControl.StartPoint.Y); |
|
53 |
this.EndPoint = new System.Windows.Point(symControl.EndPoint.X, symControl.EndPoint.Y); |
|
54 |
this.LeftBottomPoint = new System.Windows.Point(symControl.LeftBottomPoint.X, symControl.LeftBottomPoint.Y); |
|
55 |
this.TopRightPoint = new System.Windows.Point(symControl.TopRightPoint.X, symControl.TopRightPoint.Y); |
|
56 |
this.StrokeColor = symControl.StrokeColor; |
|
57 |
this.CommentAngle = symControl.CommentAngle; |
|
58 |
this.UserID = symControl.UserID; |
|
59 |
|
|
60 |
this.PathData = symControl.PathData.Clone(); |
|
61 |
this.Opacity = symControl.Opacity; |
|
62 |
this.Memo = symControl.Memo; |
|
63 |
} |
|
64 |
} |
|
65 |
|
|
66 |
public override CommentUserInfo Clone() |
|
67 |
{ |
|
68 |
var clone = new SymControl(); |
|
69 |
clone.Copy(this); |
|
70 |
return clone; |
|
71 |
} |
|
43 | 72 |
|
44 | 73 |
public void Dispose() |
45 | 74 |
{ |
내보내기 Unified diff