개정판 7b34fb3a
drawing control copy, clone 추가
Change-Id: I453efca38394beb691b91c3ad0ab288725668d77
MarkupToPDF/Controls/Etc/DateControl.cs | ||
---|---|---|
41 | 41 |
//this.DefaultStyleKey = typeof(DateControl); |
42 | 42 |
} |
43 | 43 |
|
44 |
public override void Copy(CommentUserInfo lhs) |
|
45 |
{ |
|
46 |
if(lhs is DateControl dateControl) |
|
47 |
{ |
|
48 |
this.CommentAngle = dateControl.CommentAngle; |
|
49 |
this.StartPoint = new Point(dateControl.StartPoint.X, dateControl.StartPoint.Y); |
|
50 |
this.EndPoint = new Point(dateControl.EndPoint.X, dateControl.EndPoint.Y); |
|
51 |
this.LeftBottomPoint = new Point(dateControl.LeftBottomPoint.X, dateControl.LeftBottomPoint.Y); |
|
52 |
this.TopRightPoint = new Point(dateControl.TopRightPoint.X, dateControl.TopRightPoint.Y); |
|
53 |
this.Opacity = dateControl.Opacity; |
|
54 |
this.FontColor = dateControl.FontColor; |
|
55 |
this.LineSize = dateControl.LineSize; |
|
56 |
this.Text = dateControl.Text; |
|
57 |
this.PointSet = dateControl.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
58 |
this.UserID = dateControl.UserID; |
|
59 |
this.Memo = dateControl.Memo; |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
44 | 63 |
/// <summary> |
45 | 64 |
/// 복사본을 생성한다. |
46 | 65 |
/// </summary> |
47 | 66 |
/// <returns></returns> |
48 | 67 |
public override CommentUserInfo Clone() |
49 | 68 |
{ |
50 |
return new DateControl |
|
51 |
{ |
|
52 |
CommentAngle = this.CommentAngle, |
|
53 |
StartPoint = new Point(this.StartPoint.X, this.StartPoint.Y), |
|
54 |
EndPoint = new Point(this.EndPoint.X, this.EndPoint.Y), |
|
55 |
LeftBottomPoint = new Point(this.LeftBottomPoint.X, this.LeftBottomPoint.Y), |
|
56 |
TopRightPoint = new Point(this.TopRightPoint.X, this.TopRightPoint.Y), |
|
57 |
Opacity = this.Opacity, |
|
58 |
FontColor = this.FontColor, |
|
59 |
LineSize = this.LineSize, |
|
60 |
Text = this.Text, |
|
61 |
PointSet = this.PointSet.ConvertAll(x => new Point(x.X, x.Y)), |
|
62 |
UserID = this.UserID, |
|
63 |
Memo = this.Memo |
|
64 |
}; |
|
69 |
|
|
70 |
var clone = new DateControl(); |
|
71 |
clone.Copy(this); |
|
72 |
return clone; |
|
65 | 73 |
} |
66 | 74 |
|
67 | 75 |
#region Dependency Properties |
내보내기 Unified diff