개정판 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 |
MarkupToPDF/Controls/Etc/ImgControl.cs | ||
---|---|---|
16 | 16 |
using MarkupToPDF.Serialize.Core; |
17 | 17 |
using MarkupToPDF.Serialize.S_Control; |
18 | 18 |
using System.Windows.Media.Imaging; |
19 |
using MarkupToPDF.Controls.Shape; |
|
20 |
using System.Security.Policy; |
|
19 | 21 |
|
20 | 22 |
namespace MarkupToPDF.Controls.Etc |
21 | 23 |
{ |
... | ... | |
41 | 43 |
{ |
42 | 44 |
//this.DefaultStyleKey = typeof(ImgControl); |
43 | 45 |
} |
46 |
public override void Copy(CommentUserInfo lhs) |
|
47 |
{ |
|
48 |
if(lhs is ImgControl imgControl) |
|
49 |
{ |
|
50 |
this.CommentAngle = imgControl.CommentAngle; |
|
51 |
this.StartPoint = new Point(imgControl.StartPoint.X, imgControl.StartPoint.Y); |
|
52 |
this.TopRightPoint = new Point(imgControl.TopRightPoint.X, imgControl.TopRightPoint.Y); |
|
53 |
this.EndPoint = new Point(imgControl.EndPoint.X, imgControl.EndPoint.Y); |
|
54 |
this.LeftBottomPoint = new Point(imgControl.LeftBottomPoint.X, imgControl.LeftBottomPoint.Y); |
|
55 |
this.PointSet = imgControl.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
56 |
this.Opacity = imgControl.Opacity; |
|
57 |
this.FilePath = imgControl.FilePath; |
|
58 |
this.UserID = imgControl.UserID; |
|
59 |
this.ImageData = imgControl.ImageData; |
|
60 |
this.Memo = imgControl.Memo; |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 |
public override CommentUserInfo Clone() |
|
65 |
{ |
|
66 |
var clone = new ImgControl(); |
|
67 |
clone.Copy(this); |
|
68 |
return clone; |
|
69 |
} |
|
44 | 70 |
|
45 | 71 |
public void Dispose() |
46 | 72 |
{ |
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 |
{ |
MarkupToPDF/Controls/Etc/SymControlN.cs | ||
---|---|---|
37 | 37 |
// System.Diagnostics.Debug.WriteLine("resource Count :" + Application.Current.Resources.MergedDictionaries.Count); |
38 | 38 |
} |
39 | 39 |
|
40 |
public override void Copy(CommentUserInfo lhs) |
|
41 |
{ |
|
42 |
if (lhs is SymControlN symControlN) |
|
43 |
{ |
|
44 |
this.PointSet = symControlN.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
45 |
this.StartPoint = new Point(symControlN.StartPoint.X, symControlN.StartPoint.Y); |
|
46 |
this.EndPoint = new Point(symControlN.EndPoint.X, symControlN.EndPoint.Y); |
|
47 |
this.CommentAngle = symControlN.CommentAngle; |
|
48 |
this.LeftBottomPoint = new Point(symControlN.LeftBottomPoint.X, symControlN.LeftBottomPoint.Y); |
|
49 |
this.TopRightPoint = new Point(symControlN.TopRightPoint.X, symControlN.TopRightPoint.Y); |
|
50 |
this.Opacity = symControlN.Opacity; |
|
51 |
this.PathXathData = symControlN.PathXathData; |
|
52 |
this.Memo = symControlN.Memo; |
|
53 |
} |
|
54 |
} |
|
55 |
|
|
56 |
public override CommentUserInfo Clone() |
|
57 |
{ |
|
58 |
var clone = new SymControlN(); |
|
59 |
clone.Copy(this); |
|
60 |
return clone; |
|
61 |
} |
|
62 |
|
|
40 | 63 |
public event PropertyChangedEventHandler PropertyChanged; |
41 | 64 |
protected void RaisePropertyChanged(string propName) |
42 | 65 |
{ |
MarkupToPDF/Controls/Shape/RectCloudControl.cs | ||
---|---|---|
16 | 16 |
using MarkupToPDF.Serialize.S_Control; |
17 | 17 |
using System.Linq; |
18 | 18 |
using System.ServiceModel.Activation; |
19 |
using System.Windows.Markup; |
|
19 | 20 |
|
20 | 21 |
namespace MarkupToPDF.Controls.Shape |
21 | 22 |
{ |
... | ... | |
42 | 43 |
//Application.Current.Resources.MergedDictionaries.Add(dictionary); |
43 | 44 |
} |
44 | 45 |
|
46 |
public override void Copy(CommentUserInfo lhs) |
|
47 |
{ |
|
48 |
if (lhs is RectCloudControl rectCloudControl) |
|
49 |
{ |
|
50 |
this.StartPoint = new System.Windows.Point(rectCloudControl.StartPoint.X, rectCloudControl.StartPoint.Y); |
|
51 |
this.EndPoint = new System.Windows.Point(rectCloudControl.EndPoint.X, rectCloudControl.EndPoint.Y); |
|
52 |
this.LeftBottomPoint = new System.Windows.Point(rectCloudControl.LeftBottomPoint.X, rectCloudControl.LeftBottomPoint.Y); |
|
53 |
this.TopRightPoint = new System.Windows.Point(rectCloudControl.TopRightPoint.X, rectCloudControl.TopRightPoint.Y); |
|
54 |
this.Paint = rectCloudControl.Paint; |
|
55 |
this.Opacity = rectCloudControl.Opacity; |
|
56 |
this.DashSize = rectCloudControl.DashSize; |
|
57 |
this.PointSet = rectCloudControl.PointSet.ConvertAll(x => new System.Windows.Point(x.X, x.Y)); |
|
58 |
this.StrokeColor = rectCloudControl.StrokeColor; |
|
59 |
this.ArcLength = rectCloudControl.ArcLength; |
|
60 |
this.LineSize = rectCloudControl.LineSize; |
|
61 |
this.UserID = rectCloudControl.UserID; |
|
62 |
this.Memo = rectCloudControl.Memo; |
|
63 |
} |
|
64 |
} |
|
65 |
|
|
66 |
public override CommentUserInfo Clone() |
|
67 |
{ |
|
68 |
var clone = new RectCloudControl(); |
|
69 |
clone.Copy(this); |
|
70 |
return clone; |
|
71 |
} |
|
72 |
|
|
45 | 73 |
#region Dependency Properties |
46 | 74 |
|
47 | 75 |
public static readonly DependencyProperty mousemodeProperty = |
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