개정판 7b34fb3a
drawing control copy, clone 추가
Change-Id: I453efca38394beb691b91c3ad0ab288725668d77
MarkupToPDF/Controls/Shape/RectangleControl.cs | ||
---|---|---|
13 | 13 |
using MarkupToPDF.Serialize.Core; |
14 | 14 |
using MarkupToPDF.Serialize.S_Control; |
15 | 15 |
using System.Windows.Input; |
16 |
using System.Windows.Markup; |
|
16 | 17 |
|
17 | 18 |
namespace MarkupToPDF.Controls.Shape |
18 | 19 |
{ |
... | ... | |
510 | 511 |
//Application.Current.Resources.MergedDictionaries.Add(dictionary); |
511 | 512 |
} |
512 | 513 |
|
514 |
public override void Copy(CommentUserInfo lhs) |
|
515 |
{ |
|
516 |
if (lhs is RectangleControl rectangleControl) |
|
517 |
{ |
|
518 |
this.LineSize = rectangleControl.LineSize; |
|
519 |
this.Paint = rectangleControl.Paint; |
|
520 |
this.StartPoint = new System.Windows.Point(rectangleControl.StartPoint.X, rectangleControl.StartPoint.Y); |
|
521 |
this.EndPoint = new System.Windows.Point(rectangleControl.EndPoint.X, rectangleControl.EndPoint.Y); |
|
522 |
this.LeftBottomPoint = new System.Windows.Point(rectangleControl.LeftBottomPoint.X, rectangleControl.LeftBottomPoint.Y); |
|
523 |
this.TopRightPoint = new System.Windows.Point(rectangleControl.TopRightPoint.X, rectangleControl.TopRightPoint.Y); |
|
524 |
this.CommentAngle = rectangleControl.CommentAngle; |
|
525 |
this.StrokeColor = rectangleControl.StrokeColor; |
|
526 |
this.DashSize = rectangleControl.DashSize; |
|
527 |
this.Opacity = rectangleControl.Opacity; |
|
528 |
this.PointSet = rectangleControl.PointSet.ConvertAll(x => new System.Windows.Point(x.X, x.Y)); |
|
529 |
this.UserID = rectangleControl.UserID; |
|
530 |
this.Memo = rectangleControl.Memo; |
|
531 |
} |
|
532 |
} |
|
533 |
|
|
534 |
public override CommentUserInfo Clone() |
|
535 |
{ |
|
536 |
var clone = new RectangleControl(); |
|
537 |
clone.Copy(this); |
|
538 |
return clone; |
|
539 |
} |
|
540 |
|
|
513 | 541 |
|
514 | 542 |
public override void OnApplyTemplate() |
515 | 543 |
{ |
내보내기 Unified diff