개정판 e1b36bc0
Feature: Grouping 기능 추가(Ctrl+G : Group, Ctrl+Shift+G : Ungroup)
Change-Id: I99a3309acd55799ff7101522feaa035225b80e48
KCOM/Common/SelectionSet.cs | ||
---|---|---|
49 | 49 |
} |
50 | 50 |
} |
51 | 51 |
|
52 |
/// <summary> |
|
53 |
/// 현재 선택된 아이템들을 리턴한다. |
|
54 |
/// </summary> |
|
52 | 55 |
public List<CommentUserInfo> SelectedItems |
53 | 56 |
{ |
54 | 57 |
get |
... | ... | |
58 | 61 |
{ |
59 | 62 |
if (item.GetType().Name == "AdornerFinal") |
60 | 63 |
{ |
61 |
foreach (var InnerItem in (item as Controls.AdornerFinal).Members.Cast<Controls.AdornerMember>())
|
|
64 |
foreach (var InnerItem in (item as Controls.AdornerFinal).Members) |
|
62 | 65 |
{ |
63 | 66 |
res.Add(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
64 | 67 |
} |
... | ... | |
70 | 73 |
} |
71 | 74 |
|
72 | 75 |
/// <summary> |
76 |
/// select given item |
|
77 |
/// </summary> |
|
78 |
/// <param name="Clear">이전 SelectionSet을 제거할지 여부</param> |
|
79 |
/// <author>humkyung</author> |
|
80 |
public Controls.AdornerFinal SelectItem(CommentUserInfo comment, MainMenu mainMenu, bool Clear=true) |
|
81 |
{ |
|
82 |
List<CommentUserInfo> AlreadySelected = !Clear ? SelectionSet.Instance.SelectedItems : new List<CommentUserInfo>(); |
|
83 |
this.UnSelect(mainMenu); /// unselect alreay selected items |
|
84 |
|
|
85 |
List<CommentUserInfo> selected = new List<CommentUserInfo>() { comment }; |
|
86 |
if (!string.IsNullOrEmpty(comment.GroupID)) |
|
87 |
{ |
|
88 |
var group = ViewerDataModel.Instance.MarkupControls_USER.Where(x => !string.IsNullOrEmpty(x.GroupID) && x.GroupID.Equals(comment.GroupID) && !x.Equals(comment)); |
|
89 |
selected.AddRange(group); |
|
90 |
} |
|
91 |
selected.ForEach(x => mainMenu.Control_Style(x)); |
|
92 |
|
|
93 |
selected.InsertRange(0, AlreadySelected); |
|
94 |
return new Controls.AdornerFinal(selected); |
|
95 |
} |
|
96 |
|
|
97 |
/// <summary> |
|
73 | 98 |
/// select all controls |
74 | 99 |
/// - unselect selected items |
75 | 100 |
/// - adornerset을 생성하고 SelectLayer에 추가한다 |
... | ... | |
85 | 110 |
|
86 | 111 |
foreach (var item in controls) adornerSet.Add(item); |
87 | 112 |
|
88 |
if (adornerSet.Count > 0)
|
|
113 |
if (adornerSet.Any())
|
|
89 | 114 |
{ |
90 | 115 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
91 | 116 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
... | ... | |
98 | 123 |
/// <author>humkyung</author> |
99 | 124 |
/// <date>2018.06.14</date> |
100 | 125 |
/// <param name="rect"></param> |
101 |
public void SelectItemByRect(Rect rect, MainMenu mainMenu)
|
|
126 |
public Controls.AdornerFinal SelectItemByRect(Rect rect, MainMenu mainMenu, bool Clear=true)
|
|
102 | 127 |
{ |
103 |
var selected = |
|
104 |
from comment in ViewerDataModel.Instance.MarkupControls_USER |
|
105 |
where comment.Visibility != Visibility.Hidden && rect.Contains(comment.ItemRect) |
|
106 |
select comment; |
|
128 |
Controls.AdornerFinal selection = null; |
|
129 |
|
|
130 |
var selected = ViewerDataModel.Instance.MarkupControls_USER.Where(x => x.Visibility != Visibility.Hidden && rect.Contains(x.ItemRect)).ToList(); |
|
107 | 131 |
if (selected.Any()) |
108 | 132 |
{ |
133 |
List<CommentUserInfo> AlreadySelected = !Clear ? SelectionSet.Instance.SelectedItems : new List<CommentUserInfo>(); |
|
109 | 134 |
this.UnSelect(mainMenu); /// unselect alreay selected items |
110 | 135 |
|
111 |
foreach(var comment in selected) mainMenu.Control_Style(comment); |
|
136 |
List<CommentUserInfo> groups = new List<CommentUserInfo>(); |
|
137 |
foreach (var comment in selected) |
|
138 |
{ |
|
139 |
if(!string.IsNullOrEmpty(comment.GroupID)) |
|
140 |
{ |
|
141 |
var group = ViewerDataModel.Instance.MarkupControls_USER.Where(x => !string.IsNullOrEmpty(x.GroupID) && x.GroupID.Equals(comment.GroupID) && !selected.Contains(x)); |
|
142 |
if(group.Any()) groups.AddRange(group); |
|
143 |
} |
|
144 |
} |
|
145 |
if(groups.Any()) selected.AddRange(groups); |
|
146 |
selected.ForEach(x => mainMenu.Control_Style(x)); |
|
147 |
selected.InsertRange(0, AlreadySelected); |
|
112 | 148 |
|
113 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
114 |
adornerSet.AddRange(selected); |
|
115 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
|
116 |
mainMenu.SelectLayer.Children.Add(final); |
|
149 |
selection = new Controls.AdornerFinal(selected); |
|
150 |
mainMenu.SelectLayer.Children.Add(selection); |
|
117 | 151 |
} |
152 |
|
|
153 |
return selection; |
|
118 | 154 |
} |
119 | 155 |
|
120 | 156 |
/// <summary> |
... | ... | |
149 | 185 |
#region ZIndex 설정 |
150 | 186 |
System.Windows.Controls.Canvas.SetZIndex(control, control.ZIndex); |
151 | 187 |
#endregion |
152 |
if (control.Index >= 0) |
|
188 |
|
|
189 |
#region User 리스트에 기존 인덱스에 맞게 추가 |
|
190 |
if (control.Index >= 0 && control.Index <= ViewerDataModel.Instance.MarkupControls_USER.Count) |
|
153 | 191 |
{ |
154 | 192 |
ViewerDataModel.Instance.MarkupControls_USER.Insert(control.Index, control); |
155 | 193 |
} |
... | ... | |
157 | 195 |
{ |
158 | 196 |
ViewerDataModel.Instance.MarkupControls_USER.Add(control); |
159 | 197 |
} |
198 |
#endregion |
|
160 | 199 |
} |
161 | 200 |
} |
162 | 201 |
} |
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
72 | 72 |
public double DrawingAngle { get; set; } |
73 | 73 |
public List<MyThumb> ThumbList { get; set; } |
74 | 74 |
public string Symbol_ID { get; set; } |
75 |
public long Group_ID { get; set; } |
|
76 | 75 |
|
77 | 76 |
/// <summary> |
78 | 77 |
/// update thumb |
... | ... | |
205 | 204 |
dropCalendar.SelectionChanged += (sen, ea) => |
206 | 205 |
{ |
207 | 206 |
dropData.IsOpen = false; |
208 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "DateControl")
|
|
207 |
if ((this.Members[0]).DrawingData.GetType().Name == "DateControl")
|
|
209 | 208 |
{ |
210 |
DateControl data = (this.Members.First() as AdornerMember).DrawingData as DateControl;
|
|
209 |
DateControl data = (this.Members[0]).DrawingData as DateControl;
|
|
211 | 210 |
data.Text = dropCalendar.SelectedDate.Value.ToShortDateString(); |
212 | 211 |
} |
213 | 212 |
}; |
... | ... | |
246 | 245 |
this.Focus(); |
247 | 246 |
} |
248 | 247 |
|
249 |
public AdornerFinal(List<CommentUserInfo> objectData) : this()
|
|
248 |
public AdornerFinal(List<CommentUserInfo> comments) : this()
|
|
250 | 249 |
{ |
251 | 250 |
InitializeComponent(); |
252 |
foreach (var item in objectData) |
|
251 |
|
|
252 |
comments.ForEach(x => x.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(x)); |
|
253 |
foreach (var item in comments) |
|
253 | 254 |
{ |
254 |
//item.IsHitTestVisible = false; |
|
255 | 255 |
if (item is ArrowTextControl ArrTextCtrl) |
256 | 256 |
{ |
257 | 257 |
ArrTextCtrl.Base_TextBox.Focusable = true; |
258 | 258 |
} |
259 | 259 |
try |
260 | 260 |
{ |
261 |
///Canvas.SetZIndex(item, 80); |
|
262 |
|
|
263 |
item.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(item); |
|
264 | 261 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
265 | 262 |
this.ContainerContent.Children.Add(item); |
266 | 263 |
} |
... | ... | |
270 | 267 |
} |
271 | 268 |
finally |
272 | 269 |
{ |
273 |
|
|
274 | 270 |
} |
275 | 271 |
} |
276 | 272 |
|
277 |
this.SetAdornerMember(objectData);
|
|
273 |
this.SetAdornerMember(comments);
|
|
278 | 274 |
this.Focus(); |
279 | 275 |
} |
280 | 276 |
|
... | ... | |
410 | 406 |
case "OverlapWhiteControl": |
411 | 407 |
case "ClipWhiteControl": |
412 | 408 |
case "CoordinateControl": |
413 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
409 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
414 | 410 |
_ActualAngle = AngleValue = member.CommentAngle; |
415 | 411 |
break; |
416 | 412 |
case "ArrowTextControl": |
... | ... | |
419 | 415 |
DrawingData = member, |
420 | 416 |
Drawingtype = ControlType.ArrowTextControl, |
421 | 417 |
ThumbList = new List<MyThumb>(), |
422 |
Symbol_ID = member.SymbolID, |
|
423 |
Group_ID = member.GroupID, |
|
418 |
Symbol_ID = member.SymbolID |
|
424 | 419 |
}); |
425 | 420 |
(member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
426 | 421 |
_ActualAngle = AngleValue = (member as ArrowTextControl).CommentAngle; |
... | ... | |
428 | 423 |
((ArrowTextControl)member).Base_TextBox.LostFocus += TextControlLostFocus; |
429 | 424 |
break; |
430 | 425 |
case "ImgControl": |
431 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
426 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID}); |
|
432 | 427 |
_ActualAngle = AngleValue = (member as ImgControl).CommentAngle; |
433 | 428 |
break; |
434 | 429 |
case "DateControl": |
435 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
430 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
436 | 431 |
_ActualAngle = AngleValue = (member as DateControl).CommentAngle; |
437 | 432 |
break; |
438 | 433 |
case "SignControl": |
439 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
434 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
440 | 435 |
_ActualAngle = AngleValue = (member as SignControl).CommentAngle; |
441 | 436 |
break; |
442 | 437 |
case "SymControl": |
443 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
438 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
444 | 439 |
_ActualAngle = AngleValue = (member as SymControl).CommentAngle; |
445 | 440 |
break; |
446 | 441 |
case "SymControlN": |
447 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
442 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
448 | 443 |
_ActualAngle = AngleValue = (member as SymControlN).CommentAngle; |
449 | 444 |
break; |
450 | 445 |
case "TextControl": |
451 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
446 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
452 | 447 |
RectangleGeometry Data = new RectangleGeometry |
453 | 448 |
{ |
454 | 449 |
Rect = new Rect() |
... | ... | |
508 | 503 |
{ |
509 | 504 |
#region 컨트롤 조건 |
510 | 505 |
case "LineControl": |
511 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
506 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
512 | 507 |
break; |
513 | 508 |
case "ImgControl": |
514 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
509 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
515 | 510 |
break; |
516 | 511 |
case "ArrowControl": |
517 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
512 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
518 | 513 |
break; |
519 | 514 |
case "PolygonControl": |
520 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
515 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
521 | 516 |
break; |
522 | 517 |
case "ArrowTextControl": |
523 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
518 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
524 | 519 |
(member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
525 | 520 |
break; |
526 | 521 |
case "ArcControl": |
527 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
522 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
528 | 523 |
break; |
529 | 524 |
case "ArrowArcControl": |
530 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
525 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
531 | 526 |
break; |
532 | 527 |
case "DateControl": |
533 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
528 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
534 | 529 |
break; |
535 | 530 |
case "ArrowControl_Multi": |
536 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
531 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
537 | 532 |
break; |
538 | 533 |
case "RectangleControl": |
539 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
534 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
540 | 535 |
break; |
541 | 536 |
case "TriControl": |
542 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
537 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
543 | 538 |
break; |
544 | 539 |
case "CircleControl": |
545 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
540 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
546 | 541 |
break; |
547 | 542 |
case "CloudControl": |
548 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
543 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
549 | 544 |
break; |
550 | 545 |
case "RectCloudControl": |
551 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
546 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
552 | 547 |
break; |
553 | 548 |
case "SignControl": |
554 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
549 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
555 | 550 |
break; |
556 | 551 |
case "SymControl": |
557 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
552 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
558 | 553 |
break; |
559 | 554 |
case "SymControlN": |
560 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
555 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
561 | 556 |
break; |
562 | 557 |
case "InkControl": |
563 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
558 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
564 | 559 |
break; |
565 | 560 |
case "TextControl": |
566 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
561 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
567 | 562 |
|
568 | 563 |
(member as TextControl).PropertyChanged += TextControlPropertyChanged; |
569 | 564 |
(member as TextControl).Base_TextBox.SelectionChanged += TextControlSelectionChanged; |
... | ... | |
591 | 586 |
//}); |
592 | 587 |
break; |
593 | 588 |
case "InsideWhiteControl": |
594 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
589 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
595 | 590 |
break; |
596 | 591 |
case "OverlapWhiteControl": |
597 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
592 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
598 | 593 |
break; |
599 | 594 |
case "ClipWhiteControl": |
600 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
595 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
601 | 596 |
break; |
602 | 597 |
case "CoordinateControl": |
603 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
598 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID }); |
|
604 | 599 |
break; |
605 | 600 |
default: |
606 | 601 |
break; |
... | ... | |
751 | 746 |
{ |
752 | 747 |
List<Point> am = CircleCtrl.PointSet; |
753 | 748 |
lineSize = CircleCtrl.LineSize; |
754 |
minX = am.Min(x => x.X); |
|
755 |
minY = am.Min(x => x.Y); |
|
756 |
maxX = am.Max(x => x.X); |
|
757 |
maxY = am.Max(x => x.Y); |
|
749 |
|
|
750 |
List<double> xSet = am.Select(p => p.X).ToList(); |
|
751 |
List<double> ySet = am.Select(p => p.Y).ToList(); |
|
752 |
if (xSet.Min() < minX) minX = xSet.Min(); |
|
753 |
if (ySet.Min() < minY) minY = ySet.Min(); |
|
754 |
if (xSet.Max() > maxX) maxX = xSet.Max(); |
|
755 |
if (ySet.Max() > maxY) maxY = ySet.Max(); |
|
758 | 756 |
} |
759 | 757 |
else |
760 | 758 |
{ |
... | ... | |
1552 | 1550 |
{ |
1553 | 1551 |
if (e.ClickCount == 2 && this.Members.Count == 1) |
1554 | 1552 |
{ |
1555 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
1553 |
if (this.Members[0].DrawingData.GetType().Name == "TextControl")
|
|
1556 | 1554 |
{ |
1557 | 1555 |
SelectionSet.Instance.UnSelect(ViewerDataModel.Instance.SystemMain.dzMainMenu); |
1558 | 1556 |
TextControlChanger(); |
1559 | 1557 |
} |
1560 | 1558 |
|
1561 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
|
|
1559 |
else if (this.Members[0].DrawingData.GetType().Name == "ArrowTextControl")
|
|
1562 | 1560 |
{ |
1563 | 1561 |
ArrowTextControl AllControl = (this.Members.First() as AdornerMember).DrawingData as ArrowTextControl; |
1564 | 1562 |
Thumb tm = (this.Members.First() as AdornerMember).ThumbList.Last(); |
... | ... | |
1566 | 1564 |
//ArrowControl TextBox Thumb없애기 |
1567 | 1565 |
tm.Visibility = Visibility.Collapsed; |
1568 | 1566 |
|
1569 |
((this.Members.First() as AdornerMember).DrawingData as ArrowTextControl).Base_TextBox.IsHitTestVisible = true;
|
|
1567 |
(this.Members[0].DrawingData as ArrowTextControl).Base_TextBox.IsHitTestVisible = true;
|
|
1570 | 1568 |
SelectionSet.Instance.UnSelect(ViewerDataModel.Instance.SystemMain.dzMainMenu); |
1571 | 1569 |
|
1572 | 1570 |
((ArrowTextControl)AllControl).Base_TextBox.Focus(); |
... | ... | |
1585 | 1583 |
ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox), Canvas.GetTop(AllControl.Base_TextBox) + AllControl.BoxHeight / 2)); //좌단 |
1586 | 1584 |
ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox) + AllControl.BoxWidth, Canvas.GetTop(AllControl.Base_TextBox) + AllControl.BoxHeight / 2)); //우단 |
1587 | 1585 |
|
1588 |
|
|
1589 |
|
|
1590 |
|
|
1591 | 1586 |
var endP = MathSet.getNearPoint(ps, AllControl.MidPoint); |
1592 | 1587 |
var tempP = MathSet.getMiddlePoint(AllControl.StartPoint, endP); |
1593 | 1588 |
if (AllControl.isTrans) |
1594 | 1589 |
{ |
1595 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], AllControl.MidPoint.X);
|
|
1596 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], AllControl.MidPoint.Y);
|
|
1590 |
Canvas.SetLeft((this.Members[0]).ThumbList[1], AllControl.MidPoint.X);
|
|
1591 |
Canvas.SetTop((this.Members[0]).ThumbList[1], AllControl.MidPoint.Y);
|
|
1597 | 1592 |
} |
1598 | 1593 |
else |
1599 | 1594 |
{ |
1600 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
1601 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
1595 |
Canvas.SetLeft((this.Members[0]).ThumbList[1], tempP.X);
|
|
1596 |
Canvas.SetTop((this.Members[0]).ThumbList[1], tempP.Y);
|
|
1602 | 1597 |
} |
1603 | 1598 |
|
1604 | 1599 |
|
... | ... | |
1606 | 1601 |
|
1607 | 1602 |
}; |
1608 | 1603 |
} |
1609 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "DateControl")
|
|
1604 |
else if ((this.Members[0]).DrawingData.GetType().Name == "DateControl")
|
|
1610 | 1605 |
{ |
1611 |
DateControl data = (this.Members.First() as AdornerMember).DrawingData as DateControl;
|
|
1606 |
DateControl data = (this.Members[0]).DrawingData as DateControl;
|
|
1612 | 1607 |
CalendarControl instanceCal = new CalendarControl(data.Text); |
1613 | 1608 |
//dropData.IsOpen = true; |
1614 | 1609 |
RadWindow rc = new RadWindow(); |
... | ... | |
1630 | 1625 |
rc.ShowDialog(); |
1631 | 1626 |
//CalendarControl.xaml |
1632 | 1627 |
} |
1633 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArcControl")
|
|
1628 |
else if ((this.Members[0]).DrawingData.GetType().Name == "ArcControl")
|
|
1634 | 1629 |
{ |
1635 |
ArcControl instance = ((this.Members.First() as AdornerMember).DrawingData as ArcControl);
|
|
1630 |
ArcControl instance = ((this.Members[0]).DrawingData as ArcControl);
|
|
1636 | 1631 |
if (instance.isTransOn) |
1637 | 1632 |
{ |
1638 | 1633 |
instance.isTransOn = false; |
... | ... | |
1644 | 1639 |
///instance.SetArcPath(); |
1645 | 1640 |
BorderUpdate(); |
1646 | 1641 |
} |
1647 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArrowArcControl")
|
|
1642 |
else if ((this.Members[0]).DrawingData.GetType().Name == "ArrowArcControl")
|
|
1648 | 1643 |
{ |
1649 |
ArrowArcControl instance = ((this.Members.First() as AdornerMember).DrawingData as ArrowArcControl);
|
|
1644 |
ArrowArcControl instance = ((this.Members[0]).DrawingData as ArrowArcControl);
|
|
1650 | 1645 |
if (instance.isTransOn) |
1651 | 1646 |
{ |
1652 | 1647 |
instance.isTransOn = false; |
... | ... | |
1658 | 1653 |
instance.SetArcPath(); |
1659 | 1654 |
BorderUpdate(); |
1660 | 1655 |
} |
1661 |
|
|
1662 | 1656 |
} |
1663 |
|
|
1664 | 1657 |
} |
1665 | 1658 |
#endregion |
1666 | 1659 |
|
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
522 | 522 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
523 | 523 |
}); |
524 | 524 |
|
525 |
string GroupID = Guid.NewGuid().ToString(); |
|
525 | 526 |
foreach (string parse in data) |
526 | 527 |
{ |
527 | 528 |
if (!string.IsNullOrEmpty(parse)) |
... | ... | |
530 | 531 |
STAMP_Contents: App.SystemInfo.STAMP_CONTENTS); |
531 | 532 |
(item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.ShortGuid(); |
532 | 533 |
(item as MarkupToPDF.Common.CommentUserInfo).SymbolID = id; |
534 |
(item as MarkupToPDF.Common.CommentUserInfo).GroupID = GroupID; |
|
533 | 535 |
|
534 | 536 |
adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo); |
535 | 537 |
|
... | ... | |
564 | 566 |
} |
565 | 567 |
else |
566 | 568 |
{ |
567 |
await PlaceImageSymbol(id, 0);
|
|
569 |
await PlaceImageSymbol(id, string.Empty);
|
|
568 | 570 |
} |
569 | 571 |
} |
570 | 572 |
catch (Exception ex) |
... | ... | |
592 | 594 |
/// </summary> |
593 | 595 |
/// <param name="id"></param> |
594 | 596 |
/// <param name="group_id"></param> |
595 |
private async Task PlaceImageSymbol(string id, long group_id)
|
|
597 |
private async Task PlaceImageSymbol(string id, string groupID)
|
|
596 | 598 |
{ |
597 | 599 |
try |
598 | 600 |
{ |
... | ... | |
654 | 656 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
655 | 657 |
currentControl.CommentID = Commons.ShortGuid(); |
656 | 658 |
currentControl.SymbolID = id; |
657 |
currentControl.GroupID = group_id;
|
|
659 |
currentControl.GroupID = groupID;
|
|
658 | 660 |
currentControl.ApplyTemplate(); |
659 | 661 |
currentControl.SetImage(); |
660 | 662 |
|
... | ... | |
686 | 688 |
/// <summary> |
687 | 689 |
/// |
688 | 690 |
/// </summary> |
691 |
/* |
|
689 | 692 |
private void ApplyDragSelectionRect() |
690 | 693 |
{ |
691 | 694 |
var multi_UndoData = new UndoData(); |
... | ... | |
729 | 732 |
multi_UndoData = new UndoData(); |
730 | 733 |
if (item.GroupID > 0) |
731 | 734 |
{ |
732 |
|
|
733 | 735 |
} |
734 | 736 |
} |
735 | 737 |
} |
... | ... | |
745 | 747 |
this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Add(final); |
746 | 748 |
} |
747 | 749 |
} |
750 |
*/ |
|
748 | 751 |
|
749 | 752 |
///private Move move; |
750 | 753 |
#region Symbol DoubleClick Event |
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
215 | 215 |
} |
216 | 216 |
} |
217 | 217 |
break; |
218 |
#endregion |
|
218 |
#endregion |
|
219 |
case Key.G: |
|
220 |
{ |
|
221 |
#region Grouping 해제 |
|
222 |
if (ViewerDataModel.Instance.IsPressCtrl && ViewerDataModel.Instance.IsPressShift) |
|
223 |
{ |
|
224 |
SelectionSet.Instance.SelectedItems.ForEach(x => x.GroupID = string.Empty); |
|
225 |
} |
|
226 |
#endregion |
|
227 |
#region Grouping |
|
228 |
else if (ViewerDataModel.Instance.IsPressCtrl) |
|
229 |
{ |
|
230 |
string GroupID = Guid.NewGuid().ToString(); |
|
231 |
SelectionSet.Instance.SelectedItems.ForEach(x => x.GroupID = GroupID); |
|
232 |
} |
|
233 |
#endregion |
|
234 |
} |
|
235 |
break; |
|
219 | 236 |
|
220 | 237 |
#region Undo(Ctrl + Z) |
221 |
case Key.Z: |
|
238 |
case Key.Z:
|
|
222 | 239 |
{ |
223 | 240 |
if (ViewerDataModel.Instance.IsPressCtrl) UndoCommand.Instance.Execute(); |
224 | 241 |
} |
KCOM/Services/BaseServices.cs | ||
---|---|---|
36 | 36 |
public ViewInfo _ViewInfo; |
37 | 37 |
public DOCINFO _DocInfo; |
38 | 38 |
public DOCUMENT_ITEM _DocItem; |
39 |
public MEMBER userData; |
|
40 |
public List<int> MarkupSortList = new List<int>(); |
|
39 |
public MEMBER userData { get; set; } |
|
41 | 40 |
|
42 | 41 |
public event PropertyChangedEventHandler PropertyChanged; |
43 | 42 |
private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") |
... | ... | |
449 | 448 |
} |
450 | 449 |
else if (!App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission && e.Result.Where(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1).Count() > 0)//Team Consolidation Mode이고 Team Consolidation Layer가 있을 경우 |
451 | 450 |
{ |
452 |
if (App.ViewInfo.NewCommentPermission && e.Result.Where(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1 && x.MarkupInfoID == d.MarkupInfoID).Count() > 0)
|
|
451 |
if (App.ViewInfo.NewCommentPermission && e.Result.Exists(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1 && x.MarkupInfoID == d.MarkupInfoID))
|
|
453 | 452 |
d.userDelete = true; |
454 | 453 |
} |
455 | 454 |
else if (App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission) //Consolidation Mode 일 때는 해당 Comment Layer의 Status가 Avoid or Consolidation인 것만 Delete 버튼 활성화 |
... | ... | |
1178 | 1177 |
{ |
1179 | 1178 |
if (e.Error == null && e.Result) |
1180 | 1179 |
{ |
1181 |
//Logger.sendReqLog("GetDocumentItemInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + _ViewInfo.UserID, 1); |
|
1182 |
|
|
1183 | 1180 |
BaseClient.GetDocumentItemInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID, userID = _ViewInfo.UserID }); |
1184 | 1181 |
|
1185 | 1182 |
if (App.ViewInfo != null && App.ViewInfo.ProjectNO != "") |
1186 | 1183 |
{ |
1187 |
//Logger.sendReqLog("GetMember", _ViewInfo.ProjectNO + "," + _ViewInfo.UserID, 1); |
|
1188 | 1184 |
userData = BaseClient.GetMember(App.ViewInfo.ProjectNO, App.ViewInfo.UserID); |
1189 | 1185 |
if (userData != null) |
1190 | 1186 |
{ |
1191 |
//Logger.sendReqLog("GetDeptDataAsync", userData.DEPARTMENT, 1); |
|
1192 | 1187 |
BaseClient.GetDeptDataAsync(userData.DEPARTMENT); |
1193 | 1188 |
} |
1194 | 1189 |
else |
1195 | 1190 |
{ |
1196 | 1191 |
userData = new MEMBER(); |
1197 | 1192 |
userData.DEPARTMENT = "ALL"; |
1198 |
//Logger.sendReqLog("GetDeptDataAsync", userData.DEPARTMENT, 1); |
|
1199 | 1193 |
BaseClient.GetDeptDataAsync(userData.DEPARTMENT); |
1200 | 1194 |
} |
1201 | 1195 |
} |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
2429 | 2429 |
double y = Canvas.GetTop(dragSelectionBorder); |
2430 | 2430 |
double width = dragSelectionBorder.Width; |
2431 | 2431 |
double height = dragSelectionBorder.Height; |
2432 |
Boolean Flag = false; |
|
2433 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
2434 |
var Items = ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.Visibility != Visibility.Hidden).ToList(); |
|
2435 |
|
|
2436 | 2432 |
Rect dragRect = new Rect(x, y, width, height); |
2437 |
///dragRect.Inflate(width / 10, height / 10); |
|
2438 |
|
|
2439 |
foreach (var item in Items) |
|
2440 |
{ |
|
2441 |
Flag = SelectionSet.Instance.SelectControl(item, dragRect); |
|
2442 |
|
|
2443 |
if (Flag) |
|
2444 |
{ |
|
2445 |
adornerSet.Add(item); |
|
2446 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
|
2447 |
Control_Style(item); |
|
2448 |
} |
|
2449 |
} |
|
2450 |
if (adornerSet.Count > 0) |
|
2451 |
{ |
|
2452 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
|
2453 |
SelectLayer.Children.Add(final); |
|
2454 |
} |
|
2433 |
SelectionSet.Instance.SelectItemByRect(dragRect, this); |
|
2455 | 2434 |
} |
2456 | 2435 |
|
2457 | 2436 |
private void InitDragSelectionRect(Point pt1, Point pt2) |
... | ... | |
2619 | 2598 |
zoomAndPanControl2.RotationAngle = rotate.Angle; |
2620 | 2599 |
} |
2621 | 2600 |
|
2622 |
public void PlaceImageSymbol(string id, long group_id, int SelectedIndex, Point canvasZoomPanningMouseDownPoint)
|
|
2601 |
public void PlaceImageSymbol(string id, string groupID, int SelectedIndex, Point canvasZoomPanningMouseDownPoint)
|
|
2623 | 2602 |
{ |
2624 | 2603 |
string Data_ = ""; |
2625 | 2604 |
|
... | ... | |
2697 | 2676 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
2698 | 2677 |
currentControl.CommentID = Commons.ShortGuid(); |
2699 | 2678 |
currentControl.SymbolID = id; |
2700 |
currentControl.GroupID = group_id;
|
|
2679 |
currentControl.GroupID = groupID;
|
|
2701 | 2680 |
currentControl.ApplyTemplate(); |
2702 | 2681 |
currentControl.SetImage(); |
2703 | 2682 |
|
... | ... | |
2891 | 2870 |
ViewerDataModel.Instance.SetAngleVisible(Visibility.Visible); |
2892 | 2871 |
} |
2893 | 2872 |
|
2894 |
AdornerFinal final = null; |
|
2895 |
|
|
2873 |
AdornerFinal selection = null; |
|
2896 | 2874 |
if (!ViewerDataModel.Instance.IsPressCtrl) |
2897 | 2875 |
{ |
2898 |
/// 기존 selection 해제 |
|
2899 |
SelectionSet.Instance.UnSelect(this); |
|
2900 |
|
|
2901 |
final = new AdornerFinal(control); |
|
2902 |
|
|
2903 |
this.Control_Style(control); |
|
2904 |
|
|
2905 |
if ((control as IPath) != null) |
|
2876 |
selection = SelectionSet.Instance.SelectItem(control, this); |
|
2877 |
if (selection.Members.Count == 1) |
|
2906 | 2878 |
{ |
2907 |
if ((control as IPath).LineSize != 0) |
|
2908 |
{ |
|
2909 |
ViewerDataModel.Instance.LineSize = (control as IPath).LineSize; |
|
2910 |
} |
|
2911 |
} |
|
2912 |
if ((control as IShapeControl) != null) |
|
2913 |
{ |
|
2914 |
if ((control as IShapeControl).Paint == PaintSet.Hatch) |
|
2915 |
{ |
|
2916 |
ViewerDataModel.Instance.checkHatchShape = true; |
|
2917 |
} |
|
2918 |
else if ((control as IShapeControl).Paint == PaintSet.Fill) |
|
2879 |
control = selection.Members[0].DrawingData as CommentUserInfo; |
|
2880 |
if ((control as IPath) != null) |
|
2919 | 2881 |
{ |
2920 |
ViewerDataModel.Instance.checkFillShape = true; |
|
2882 |
if ((control as IPath).LineSize != 0) |
|
2883 |
{ |
|
2884 |
ViewerDataModel.Instance.LineSize = (control as IPath).LineSize; |
|
2885 |
} |
|
2921 | 2886 |
} |
2922 |
else
|
|
2887 |
if ((control as IShapeControl) != null)
|
|
2923 | 2888 |
{ |
2924 |
ViewerDataModel.Instance.checkHatchShape = false; |
|
2925 |
ViewerDataModel.Instance.checkFillShape = false; |
|
2889 |
if ((control as IShapeControl).Paint == PaintSet.Hatch) |
|
2890 |
{ |
|
2891 |
ViewerDataModel.Instance.checkHatchShape = true; |
|
2892 |
} |
|
2893 |
else if ((control as IShapeControl).Paint == PaintSet.Fill) |
|
2894 |
{ |
|
2895 |
ViewerDataModel.Instance.checkFillShape = true; |
|
2896 |
} |
|
2897 |
else |
|
2898 |
{ |
|
2899 |
ViewerDataModel.Instance.checkHatchShape = false; |
|
2900 |
ViewerDataModel.Instance.checkFillShape = false; |
|
2901 |
} |
|
2902 |
ViewerDataModel.Instance.paintSet = (control as IShapeControl).Paint; |
|
2926 | 2903 |
} |
2927 |
ViewerDataModel.Instance.paintSet = (control as IShapeControl).Paint; |
|
2928 |
} |
|
2929 |
|
|
2930 |
ViewerDataModel.Instance.ControlOpacity = control.Opacity; |
|
2931 | 2904 |
|
2932 |
if (control is TextControl TextCtrl) |
|
2933 |
{ |
|
2934 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.SetFont(TextCtrl.TextFamily); |
|
2905 |
ViewerDataModel.Instance.ControlOpacity = control.Opacity; |
|
2935 | 2906 |
|
2936 |
if (!(TextCtrl.EnableEditing)) |
|
2937 |
{ |
|
2938 |
TextCtrl.EnableEditing = true; |
|
2939 |
} |
|
2940 |
if (TextCtrl.TextStyle == FontStyles.Italic) |
|
2941 |
{ |
|
2942 |
ViewerDataModel.Instance.checkTextStyle = true; |
|
2943 |
} |
|
2944 |
else |
|
2945 |
{ |
|
2946 |
ViewerDataModel.Instance.checkTextStyle = false; |
|
2947 |
} |
|
2948 |
if (TextCtrl.TextWeight == FontWeights.Bold) |
|
2949 |
{ |
|
2950 |
ViewerDataModel.Instance.checkTextWeight = true; |
|
2951 |
} |
|
2952 |
else |
|
2907 |
if (control is TextControl TextCtrl) |
|
2953 | 2908 |
{ |
2954 |
ViewerDataModel.Instance.checkTextWeight = false; |
|
2955 |
} |
|
2956 |
if (TextCtrl.UnderLine == TextDecorations.Underline) |
|
2957 |
{ |
|
2958 |
ViewerDataModel.Instance.checkUnderLine = true; |
|
2959 |
} |
|
2960 |
else |
|
2961 |
{ |
|
2962 |
ViewerDataModel.Instance.checkUnderLine = false; |
|
2963 |
} |
|
2964 |
ViewerDataModel.Instance.TextSize = TextCtrl.TextSize; |
|
2965 |
ViewerDataModel.Instance.checkHighlight = TextCtrl.IsHighLight; |
|
2966 |
ViewerDataModel.Instance.ArcLength = TextCtrl.ArcLength; |
|
2967 |
} |
|
2968 |
else if (control is ArrowTextControl ArrowTextCtrl) |
|
2969 |
{ |
|
2970 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.SetFont((control as ArrowTextControl).TextFamily); |
|
2909 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.SetFont(TextCtrl.TextFamily); |
|
2971 | 2910 |
|
2972 |
if (!((control as ArrowTextControl).EnableEditing)) |
|
2973 |
{ |
|
2974 |
ArrowTextCtrl.EnableEditing = true; |
|
2975 |
} |
|
2976 |
if ((control as ArrowTextControl).TextStyle == FontStyles.Italic) |
|
2977 |
{ |
|
2978 |
ViewerDataModel.Instance.checkTextStyle = true; |
|
2979 |
} |
|
2980 |
else |
|
2981 |
{ |
|
2982 |
ViewerDataModel.Instance.checkTextStyle = false; |
|
2983 |
} |
|
2984 |
if ((control as ArrowTextControl).TextWeight == FontWeights.Bold) |
|
2985 |
{ |
|
2986 |
ViewerDataModel.Instance.checkTextWeight = true; |
|
2911 |
if (!(TextCtrl.EnableEditing)) |
|
2912 |
{ |
|
2913 |
TextCtrl.EnableEditing = true; |
|
2914 |
} |
|
2915 |
if (TextCtrl.TextStyle == FontStyles.Italic) |
|
2916 |
{ |
|
2917 |
ViewerDataModel.Instance.checkTextStyle = true; |
|
2918 |
} |
|
2919 |
else |
|
2920 |
{ |
|
2921 |
ViewerDataModel.Instance.checkTextStyle = false; |
|
2922 |
} |
|
2923 |
if (TextCtrl.TextWeight == FontWeights.Bold) |
|
2924 |
{ |
|
2925 |
ViewerDataModel.Instance.checkTextWeight = true; |
|
2926 |
} |
|
2927 |
else |
|
2928 |
{ |
|
2929 |
ViewerDataModel.Instance.checkTextWeight = false; |
|
2930 |
} |
|
2931 |
if (TextCtrl.UnderLine == TextDecorations.Underline) |
|
2932 |
{ |
|
2933 |
ViewerDataModel.Instance.checkUnderLine = true; |
|
2934 |
} |
|
2935 |
else |
|
2936 |
{ |
|
2937 |
ViewerDataModel.Instance.checkUnderLine = false; |
|
2938 |
} |
|
2939 |
ViewerDataModel.Instance.TextSize = TextCtrl.TextSize; |
|
2940 |
ViewerDataModel.Instance.checkHighlight = TextCtrl.IsHighLight; |
|
2941 |
ViewerDataModel.Instance.ArcLength = TextCtrl.ArcLength; |
|
2987 | 2942 |
} |
2988 |
else |
|
2943 |
else if (control is ArrowTextControl ArrowTextCtrl)
|
|
2989 | 2944 |
{ |
2990 |
ViewerDataModel.Instance.checkTextWeight = false; |
|
2945 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.SetFont((control as ArrowTextControl).TextFamily); |
|
2946 |
|
|
2947 |
if (!((control as ArrowTextControl).EnableEditing)) |
|
2948 |
{ |
|
2949 |
ArrowTextCtrl.EnableEditing = true; |
|
2950 |
} |
|
2951 |
if ((control as ArrowTextControl).TextStyle == FontStyles.Italic) |
|
2952 |
{ |
|
2953 |
ViewerDataModel.Instance.checkTextStyle = true; |
|
2954 |
} |
|
2955 |
else |
|
2956 |
{ |
|
2957 |
ViewerDataModel.Instance.checkTextStyle = false; |
|
2958 |
} |
|
2959 |
if ((control as ArrowTextControl).TextWeight == FontWeights.Bold) |
|
2960 |
{ |
|
2961 |
ViewerDataModel.Instance.checkTextWeight = true; |
|
2962 |
} |
|
2963 |
else |
|
2964 |
{ |
|
2965 |
ViewerDataModel.Instance.checkTextWeight = false; |
|
2966 |
} |
|
2967 |
if ((control as ArrowTextControl).UnderLine == TextDecorations.Underline) |
|
2968 |
{ |
|
2969 |
ViewerDataModel.Instance.checkUnderLine = true; |
|
2970 |
} |
|
2971 |
else |
|
2972 |
{ |
|
2973 |
ViewerDataModel.Instance.checkUnderLine = false; |
|
2974 |
} |
|
2975 |
ViewerDataModel.Instance.checkHighlight = ArrowTextCtrl.isHighLight; |
|
2976 |
ViewerDataModel.Instance.TextSize = ArrowTextCtrl.TextSize; |
|
2977 |
ViewerDataModel.Instance.ArcLength = ArrowTextCtrl.ArcLength; |
|
2991 | 2978 |
} |
2992 |
if ((control as ArrowTextControl).UnderLine == TextDecorations.Underline)
|
|
2979 |
else if (control is RectCloudControl RectCloudCtrl)
|
|
2993 | 2980 |
{ |
2994 |
ViewerDataModel.Instance.checkUnderLine = true;
|
|
2981 |
ViewerDataModel.Instance.ArcLength = RectCloudCtrl.ArcLength;
|
|
2995 | 2982 |
} |
2996 |
else |
|
2983 |
else if (control is CloudControl CloudCtrl)
|
|
2997 | 2984 |
{ |
2998 |
ViewerDataModel.Instance.checkUnderLine = false;
|
|
2985 |
ViewerDataModel.Instance.ArcLength = CloudCtrl.ArcLength;
|
|
2999 | 2986 |
} |
3000 |
ViewerDataModel.Instance.checkHighlight = ArrowTextCtrl.isHighLight; |
|
3001 |
ViewerDataModel.Instance.TextSize = ArrowTextCtrl.TextSize; |
|
3002 |
ViewerDataModel.Instance.ArcLength = ArrowTextCtrl.ArcLength; |
|
3003 |
} |
|
3004 |
else if (control is RectCloudControl RectCloudCtrl) |
|
3005 |
{ |
|
3006 |
ViewerDataModel.Instance.ArcLength = RectCloudCtrl.ArcLength; |
|
3007 |
} |
|
3008 |
else if (control is CloudControl CloudCtrl) |
|
3009 |
{ |
|
3010 |
ViewerDataModel.Instance.ArcLength = CloudCtrl.ArcLength; |
|
3011 | 2987 |
} |
3012 | 2988 |
} |
3013 | 2989 |
else |
3014 | 2990 |
{ |
3015 |
List<CommentUserInfo> comment = SelectionSet.Instance.SelectedItems; |
|
3016 |
SelectionSet.Instance.UnSelect(this); |
|
3017 |
comment.Add(control); |
|
3018 |
|
|
3019 |
Control_Style(control); |
|
3020 |
|
|
3021 |
final = new AdornerFinal(comment); |
|
2991 |
selection = SelectionSet.Instance.SelectItem(control, this, false); |
|
3022 | 2992 |
} |
3023 | 2993 |
|
3024 |
if (final != null)
|
|
2994 |
if (selection != null)
|
|
3025 | 2995 |
{ |
3026 |
this.SelectLayer.Children.Add(final);
|
|
2996 |
this.SelectLayer.Children.Add(selection);
|
|
3027 | 2997 |
} |
3028 | 2998 |
} |
3029 | 2999 |
} |
MarkupToPDF/Common/CommentUserInfo.cs | ||
---|---|---|
32 | 32 |
public bool IsNew { get; set; } |
33 | 33 |
public string CommentID { get; set; } |
34 | 34 |
public string SymbolID { get; set; } |
35 |
public long GroupID { get; set; }
|
|
35 |
public string GroupID { get; set; }
|
|
36 | 36 |
|
37 | 37 |
[Description("ZIndex 값이 높을 수록 앞쪽으로 배치된다.")] |
38 | 38 |
public int ZIndex { get; set; } = 10; |
MarkupToPDF/Controls/Etc/DateControl.cs | ||
---|---|---|
23 | 23 |
{ |
24 | 24 |
private const string PART_ViewBox = "PART_ViewBox"; |
25 | 25 |
private const string PART_TextBox = "PART_TextBox"; |
26 |
public Viewbox Base_ViewBox = null; |
|
27 |
public TextBlock Base_TextBox = null; |
|
26 |
public Viewbox Base_ViewBox { get; set; } = null;
|
|
27 |
public TextBlock Base_TextBox { get; set; } = null;
|
|
28 | 28 |
|
29 | 29 |
static DateControl() |
30 | 30 |
{ |
... | ... | |
58 | 58 |
UserID = item.UserID; |
59 | 59 |
Memo = item.Memo; |
60 | 60 |
ZIndex = item.ZIndex; |
61 |
GroupID = item.GroupID; |
|
61 | 62 |
} |
62 | 63 |
} |
63 | 64 |
|
... | ... | |
378 | 379 |
|
379 | 380 |
#endregion |
380 | 381 |
#region Data |
381 |
LineGeometry p1 = new LineGeometry(); |
|
382 |
LineGeometry p2 = new LineGeometry(); |
|
383 |
LineGeometry p3 = new LineGeometry(); |
|
384 |
LineGeometry p4 = new LineGeometry(); |
|
385 |
GeometryGroup instanceGroup = new GeometryGroup(); |
|
386 |
FormattedText text; |
|
382 |
GeometryGroup instanceGroup { get; } = new GeometryGroup(); |
|
383 |
FormattedText text { get; set; } |
|
387 | 384 |
#endregion |
388 | 385 |
public override void OnApplyTemplate() |
389 | 386 |
{ |
... | ... | |
411 | 408 |
this.TopRightPoint, |
412 | 409 |
}); |
413 | 410 |
|
414 |
|
|
415 | 411 |
double AngleData = this.CommentAngle * -1; |
416 | 412 |
|
417 | 413 |
PathFigure pathFigure = new PathFigure(); |
... | ... | |
437 | 433 |
pathGeometry.Figures = new PathFigureCollection(); |
438 | 434 |
pathFigure.IsClosed = true; |
439 | 435 |
pathGeometry.Figures.Add(pathFigure); |
440 |
this.Base_ViewBox.Width = pathGeometry.Bounds.Width; |
|
441 |
this.Base_ViewBox.Height = pathGeometry.Bounds.Height; |
|
442 |
this.Tag = pathGeometry; |
|
443 |
|
|
444 |
Canvas.SetLeft(this, MathSet.RotateAbout(mid, mid, AngleData).X - this.Base_ViewBox.Width / 2); |
|
445 |
Canvas.SetTop(this, MathSet.RotateAbout(mid, mid, AngleData).Y - this.Base_ViewBox.Height / 2); |
|
446 | 436 |
|
447 | 437 |
//CenterX = MathSet.RotateAbout(mid, mid, AngleData).X - this.Base_ViewBox.Width / 2; |
448 | 438 |
//CenterY = MathSet.RotateAbout(mid, mid, AngleData).Y - this.Base_ViewBox.Height / 2; |
449 | 439 |
|
450 | 440 |
instanceGroup.Children.Add(pathGeometry); |
451 | 441 |
|
442 |
double emSize = MathSet.DistanceTo(this.StartPoint, this.LeftBottomPoint); |
|
443 |
if (emSize == 0) emSize = 16; |
|
452 | 444 |
text = new FormattedText(Text, System.Globalization.CultureInfo.CurrentCulture, |
453 |
FlowDirection.LeftToRight, new Typeface("Tahoma"), 16, Brushes.Black);
|
|
445 |
FlowDirection.LeftToRight, new Typeface("Tahoma"), emSize, Brushes.Black);
|
|
454 | 446 |
|
455 |
instanceGroup.Children.Add(text.BuildGeometry(new Point(10,10))); |
|
447 |
this.Base_ViewBox.Width = text.Width; |
|
448 |
this.Base_ViewBox.Height = text.Height; |
|
449 |
this.Tag = pathGeometry; |
|
456 | 450 |
|
457 |
PathData = instanceGroup; |
|
458 |
//OverViewPathData = PathData; |
|
451 |
Canvas.SetLeft(this, mid.X - this.Base_ViewBox.Width * 0.5); |
|
452 |
Canvas.SetTop(this, mid.Y - this.Base_ViewBox.Height * 0.5); |
|
453 |
Canvas.SetRight(this, mid.X + this.Base_ViewBox.Width * 0.5); |
|
454 |
Canvas.SetBottom(this, mid.Y + this.Base_ViewBox.Height * 0.5); |
|
459 | 455 |
|
456 |
instanceGroup.Children.Add(text.BuildGeometry(new Point(0, 0))); |
|
460 | 457 |
|
458 |
PathData = instanceGroup; |
|
461 | 459 |
} |
462 | 460 |
|
463 | 461 |
public event PropertyChangedEventHandler PropertyChanged; |
... | ... | |
584 | 582 |
using (S_DateControl ctrl = new S_DateControl()) |
585 | 583 |
{ |
586 | 584 |
ctrl.Angle = this.CommentAngle; |
585 |
ctrl.StartPoint = this.StartPoint; |
|
587 | 586 |
ctrl.EndPoint = this.EndPoint; |
587 |
ctrl.PointSet = this.PointSet; |
|
588 |
|
|
588 | 589 |
ctrl.UserID = this.UserID; |
589 | 590 |
ctrl.LB = this.LeftBottomPoint; |
590 | 591 |
ctrl.Name = this.GetType().Name; |
591 |
ctrl.PointSet = this.PointSet; |
|
592 |
ctrl.StartPoint = this.StartPoint; |
|
592 |
|
|
593 | 593 |
ctrl.Opac = this.Opacity; |
594 | 594 |
ctrl.TR = this.TopRightPoint; |
595 | 595 |
ctrl.TransformPoint = "0|0"; |
... | ... | |
602 | 602 |
ctrl.Memo = this.Memo; |
603 | 603 |
|
604 | 604 |
ctrl.ZIndex = this.ZIndex; |
605 |
ctrl.GroupID = this.GroupID; |
|
605 | 606 |
|
606 | 607 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
607 | 608 |
} |
... | ... | |
631 | 632 |
PointSet = s.PointSet, |
632 | 633 |
UserID = s.UserID, |
633 | 634 |
Memo = s.Memo, |
634 |
ZIndex = s.ZIndex |
|
635 |
ZIndex = s.ZIndex, |
|
636 |
GroupID = s.GroupID |
|
635 | 637 |
}; |
636 | 638 |
} |
637 | 639 |
} |
MarkupToPDF/Controls/Etc/ImgControl.cs | ||
---|---|---|
45 | 45 |
} |
46 | 46 |
public override void Copy(CommentUserInfo lhs) |
47 | 47 |
{ |
48 |
if(lhs is ImgControl imgControl)
|
|
48 |
if(lhs is ImgControl item)
|
|
49 | 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 |
this.ZIndex = imgControl.ZIndex; |
|
50 |
this.CommentAngle = item.CommentAngle; |
|
51 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
52 |
this.TopRightPoint = new Point(item.TopRightPoint.X, item.TopRightPoint.Y); |
|
53 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
54 |
this.LeftBottomPoint = new Point(item.LeftBottomPoint.X, item.LeftBottomPoint.Y); |
|
55 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
56 |
this.Opacity = item.Opacity; |
|
57 |
this.FilePath = item.FilePath; |
|
58 |
this.UserID = item.UserID; |
|
59 |
this.ImageData = item.ImageData; |
|
60 |
this.Memo = item.Memo; |
|
61 |
this.ZIndex = item.ZIndex; |
|
62 |
GroupID = item.GroupID; |
|
62 | 63 |
} |
63 | 64 |
} |
64 | 65 |
|
... | ... | |
524 | 525 |
ctrl.Memo = this.Memo; |
525 | 526 |
|
526 | 527 |
ctrl.ZIndex = this.ZIndex; |
528 |
ctrl.GroupID = this.GroupID; |
|
527 | 529 |
|
528 | 530 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
529 | 531 |
} |
... | ... | |
572 | 574 |
UserID = s.UserID, |
573 | 575 |
ImageData = img.Source, |
574 | 576 |
Memo = s.Memo, |
577 |
GroupID = s.GroupID, |
|
575 | 578 |
ZIndex = s.ZIndex |
576 | 579 |
}; |
577 | 580 |
|
MarkupToPDF/Controls/Etc/SignControl.cs | ||
---|---|---|
58 | 58 |
this.UserNumber = item.UserNumber; |
59 | 59 |
this.Memo = item.Memo; |
60 | 60 |
this.ZIndex = item.ZIndex; |
61 |
this.GroupID = item.GroupID; |
|
61 | 62 |
} |
62 | 63 |
} |
63 | 64 |
|
... | ... | |
507 | 508 |
ctrl.Memo = this.Memo; |
508 | 509 |
|
509 | 510 |
ctrl.ZIndex = this.ZIndex; |
511 |
ctrl.GroupID = this.GroupID; |
|
510 | 512 |
|
511 | 513 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
512 | 514 |
} |
... | ... | |
535 | 537 |
UserID = s.UserID, |
536 | 538 |
UserNumber = s.UserNumber, |
537 | 539 |
Memo = s.Memo, |
538 |
ZIndex = s.ZIndex |
|
540 |
ZIndex = s.ZIndex, |
|
541 |
GroupID = s.GroupID |
|
539 | 542 |
}; |
540 | 543 |
|
541 | 544 |
if (s.UserNumber != null) |
MarkupToPDF/Controls/Etc/SymControl.cs | ||
---|---|---|
44 | 44 |
} |
45 | 45 |
public override void Copy(CommentUserInfo lhs) |
46 | 46 |
{ |
47 |
if(lhs is SymControl symControl)
|
|
47 |
if(lhs is SymControl item)
|
|
48 | 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 |
this.ZIndex = symControl.ZIndex; |
|
49 |
this.LineSize = item.LineSize; |
|
50 |
this.PointSet = item.PointSet.ConvertAll(x => new System.Windows.Point(x.X, x.Y)); |
|
51 |
this.Paint = item.Paint; |
|
52 |
this.StartPoint = new System.Windows.Point(item.StartPoint.X, item.StartPoint.Y); |
|
53 |
this.EndPoint = new System.Windows.Point(item.EndPoint.X, item.EndPoint.Y); |
|
54 |
this.LeftBottomPoint = new System.Windows.Point(item.LeftBottomPoint.X, item.LeftBottomPoint.Y); |
|
55 |
this.TopRightPoint = new System.Windows.Point(item.TopRightPoint.X, item.TopRightPoint.Y); |
|
56 |
this.StrokeColor = item.StrokeColor; |
|
57 |
this.CommentAngle = item.CommentAngle; |
|
58 |
this.UserID = item.UserID; |
|
59 |
|
|
60 |
this.PathData = item.PathData.Clone(); |
|
61 |
this.Opacity = item.Opacity; |
|
62 |
this.Memo = item.Memo; |
|
63 |
this.ZIndex = item.ZIndex; |
|
64 |
GroupID = item.GroupID; |
|
64 | 65 |
} |
65 | 66 |
} |
66 | 67 |
|
... | ... | |
540 | 541 |
ctrl.Opac = this.Opacity; |
541 | 542 |
ctrl.Name = this.GetType().Name.ToString(); |
542 | 543 |
ctrl.ZIndex = this.ZIndex; |
544 |
ctrl.GroupID = this.GroupID; |
|
543 | 545 |
|
544 | 546 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
545 | 547 |
} |
... | ... | |
572 | 574 |
PathData = sm.Convert(s.PathInfo.ToString()), |
573 | 575 |
Opacity = s.Opac, |
574 | 576 |
Memo = s.Memo, |
575 |
ZIndex = s.ZIndex |
|
577 |
ZIndex = s.ZIndex, |
|
578 |
GroupID = s.GroupID |
|
576 | 579 |
}; |
577 | 580 |
} |
578 | 581 |
|
MarkupToPDF/Controls/Etc/SymControlN.cs | ||
---|---|---|
39 | 39 |
|
40 | 40 |
public override void Copy(CommentUserInfo lhs) |
41 | 41 |
{ |
42 |
if (lhs is SymControlN symControlN)
|
|
42 |
if (lhs is SymControlN item)
|
|
43 | 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.TopRightPoint = new Point(symControlN.TopRightPoint.X, symControlN.TopRightPoint.Y); |
|
47 |
this.EndPoint = new Point(symControlN.EndPoint.X, symControlN.EndPoint.Y); |
|
48 |
this.LeftBottomPoint = new Point(symControlN.LeftBottomPoint.X, symControlN.LeftBottomPoint.Y); |
|
49 |
this.PointSet = symControlN.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
50 |
this.CommentAngle = symControlN.CommentAngle; |
|
51 |
this.Opacity = symControlN.Opacity; |
|
52 |
this.PathXathData = symControlN.PathXathData; |
|
53 |
this.Memo = symControlN.Memo; |
|
54 |
this.ZIndex = symControlN.ZIndex; |
|
44 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
45 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
46 |
this.TopRightPoint = new Point(item.TopRightPoint.X, item.TopRightPoint.Y); |
|
47 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
48 |
this.LeftBottomPoint = new Point(item.LeftBottomPoint.X, item.LeftBottomPoint.Y); |
|
49 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
50 |
this.CommentAngle = item.CommentAngle; |
|
51 |
this.Opacity = item.Opacity; |
|
52 |
this.PathXathData = item.PathXathData; |
|
53 |
this.Memo = item.Memo; |
|
54 |
this.ZIndex = item.ZIndex; |
|
55 |
GroupID = item.GroupID; |
|
55 | 56 |
} |
56 | 57 |
} |
57 | 58 |
|
... | ... | |
537 | 538 |
ctrl.Opac = this.Opacity; |
538 | 539 |
ctrl.Name = this.GetType().Name.ToString(); |
539 | 540 |
ctrl.ZIndex = this.ZIndex; |
541 |
ctrl.GroupID = this.GroupID; |
|
540 | 542 |
|
541 | 543 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
542 | 544 |
} |
... | ... | |
562 | 564 |
Opacity = s.Opac, |
563 | 565 |
PathXathData = s.DBData, |
564 | 566 |
Memo = s.Memo, |
565 |
ZIndex = s.ZIndex |
|
567 |
ZIndex = s.ZIndex, |
|
568 |
GroupID = s.GroupID |
|
566 | 569 |
}; |
567 | 570 |
} |
568 | 571 |
} |
MarkupToPDF/Controls/Line/ArcControl.cs | ||
---|---|---|
43 | 43 |
|
44 | 44 |
public override void Copy(CommentUserInfo lhs) |
45 | 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; |
|
46 |
if (lhs is ArcControl item) |
|
47 |
{ |
|
48 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
49 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
50 |
this.DashSize = item.DashSize; |
|
51 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
52 |
this.isTransOn = item.isTransOn; |
|
53 |
this.MidPoint = new Point(item.MidPoint.X, item.MidPoint.Y); |
|
54 |
this.StrokeColor = item.StrokeColor; |
|
55 |
this.Opacity = item.Opacity; |
|
56 |
this.Clock = item.Clock; |
|
57 |
this.LineSize = item.LineSize; |
|
58 |
this.UserID = item.UserID; |
|
59 |
this.Memo = item.Memo; |
|
60 |
ZIndex = item.ZIndex; |
|
61 |
GroupID = item.GroupID; |
|
60 | 62 |
} |
61 | 63 |
} |
62 | 64 |
|
... | ... | |
672 | 674 |
ctrl.Memo = this.Memo; |
673 | 675 |
|
674 | 676 |
ctrl.ZIndex = this.ZIndex; |
677 |
ctrl.GroupID = this.GroupID; |
|
675 | 678 |
|
676 | 679 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
677 | 680 |
} |
... | ... | |
702 | 705 |
LineSize = Convert.ToDouble(data2.First()), |
703 | 706 |
UserID = s.UserID, |
704 | 707 |
Memo = s.Memo, |
705 |
ZIndex = s.ZIndex |
|
708 |
ZIndex = s.ZIndex, |
|
709 |
GroupID = s.GroupID |
|
706 | 710 |
}; |
707 | 711 |
} |
708 | 712 |
|
MarkupToPDF/Controls/Line/ArrowArcControl.cs | ||
---|---|---|
43 | 43 |
|
44 | 44 |
public override void Copy(CommentUserInfo lhs) |
45 | 45 |
{ |
46 |
if (lhs is ArrowArcControl ArrowArcCtrl)
|
|
46 |
if (lhs is ArrowArcControl item)
|
|
47 | 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 |
this.ZIndex = ArrowArcCtrl.ZIndex; |
|
48 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
|
49 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
|
50 |
this.DashSize = item.DashSize; |
|
51 |
this.PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y)); |
|
52 |
this.isTransOn = item.isTransOn; |
|
53 |
this.MiddlePoint = new Point(item.MiddlePoint.X, item.MiddlePoint.Y); |
|
54 |
this.StrokeColor = item.StrokeColor; |
|
55 |
this.Opacity = item.Opacity; |
|
56 |
|
|
57 |
this.Clock = item.Clock; |
|
58 |
this.LineSize = item.LineSize; |
|
59 |
this.UserID = item.UserID; |
|
60 |
this.Memo = item.Memo; |
|
61 |
this.ZIndex = item.ZIndex; |
|
62 |
GroupID = item.GroupID; |
|
62 | 63 |
} |
63 | 64 |
} |
64 | 65 |
|
... | ... | |
618 | 619 |
ctrl.Memo = this.Memo; |
619 | 620 |
|
620 | 621 |
ctrl.ZIndex = this.ZIndex; |
622 |
ctrl.GroupID = this.GroupID; |
|
621 | 623 |
|
622 | 624 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
623 | 625 |
} |
... | ... | |
649 | 651 |
LineSize = Convert.ToDouble(data2.First()), |
650 | 652 |
UserID = s.UserID, |
651 | 653 |
Memo = s.Memo, |
652 |
ZIndex = s.ZIndex |
|
654 |
ZIndex = s.ZIndex, |
|
655 |
GroupID = s.GroupID |
|
653 | 656 |
}; |
654 | 657 |
} |
655 | 658 |
|
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs | ||
---|---|---|
55 | 55 |
this.UserID = item.UserID; |
56 | 56 |
this.Memo = item.Memo; |
57 | 57 |
this.ZIndex = item.ZIndex; |
58 |
GroupID = item.GroupID; |
|
58 | 59 |
} |
59 | 60 |
} |
60 | 61 |
|
... | ... | |
499 | 500 |
ctrl.Memo = this.Memo; |
500 | 501 |
|
501 | 502 |
ctrl.ZIndex = this.ZIndex; |
503 |
ctrl.GroupID = this.GroupID; |
|
502 | 504 |
|
503 | 505 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
504 | 506 |
}; |
... | ... | |
527 | 529 |
StrokeColor = brush, |
528 | 530 |
UserID = s.UserID, |
529 | 531 |
Memo = s.Memo, |
530 |
ZIndex = s.ZIndex |
|
532 |
ZIndex = s.ZIndex, |
|
533 |
GroupID = s.GroupID |
|
531 | 534 |
}; |
532 | 535 |
} |
533 | 536 |
|
MarkupToPDF/Controls/Line/LineControl.cs | ||
---|---|---|
71 | 71 |
this.UserID = item.UserID; |
72 | 72 |
this.LineSize = item.LineSize; |
73 | 73 |
this.ZIndex = item.ZIndex; |
74 |
GroupID = item.GroupID; |
|
74 | 75 |
} |
75 | 76 |
} |
76 | 77 |
|
... | ... | |
633 | 634 |
ctrl.Memo = this.Memo; |
634 | 635 |
|
635 | 636 |
ctrl.ZIndex = this.ZIndex; |
637 |
ctrl.GroupID = this.GroupID; |
|
636 | 638 |
|
637 | 639 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
638 | 640 |
} |
... | ... | |
662 | 664 |
StrokeColor = brush, |
663 | 665 |
UserID = ctrl.UserID, |
664 | 666 |
LineSize = Convert.ToDouble(data2.First()), |
665 |
ZIndex = ctrl.ZIndex |
|
667 |
ZIndex = ctrl.ZIndex, |
|
668 |
GroupID = ctrl.GroupID |
|
666 | 669 |
}; |
667 | 670 |
} |
668 | 671 |
|
MarkupToPDF/Controls/Polygon/CloudControl.cs | ||
---|---|---|
60 | 60 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
61 | 61 |
this.Memo = item.Memo; |
62 | 62 |
this.ZIndex = item.ZIndex; |
63 |
GroupID = item.GroupID; |
|
63 | 64 |
} |
64 | 65 |
} |
65 | 66 |
|
... | ... | |
1147 | 1148 |
ctrl.Memo = this.Memo; |
1148 | 1149 |
|
1149 | 1150 |
ctrl.ZIndex = this.ZIndex; |
1151 |
ctrl.GroupID = this.GroupID; |
|
1150 | 1152 |
|
1151 | 1153 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
1152 | 1154 |
} |
... | ... | |
1180 | 1182 |
StartPoint = s.StartPoint, |
1181 | 1183 |
EndPoint = s.EndPoint, |
1182 | 1184 |
Memo = s.Memo, |
1183 |
ZIndex = s.ZIndex |
|
1185 |
ZIndex = s.ZIndex, |
|
1186 |
GroupID = s.GroupID |
|
1184 | 1187 |
|
1185 | 1188 |
//Fill = s.CloudFill, |
1186 | 1189 |
}; |
MarkupToPDF/Controls/Polygon/InkControl.cs | ||
---|---|---|
49 | 49 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
50 | 50 |
this.Memo = item.Memo; |
51 | 51 |
this.ZIndex = item.ZIndex; |
52 |
GroupID = item.GroupID; |
|
52 | 53 |
} |
53 | 54 |
} |
54 | 55 |
|
... | ... | |
627 | 628 |
ctrl.Memo = this.Memo; |
628 | 629 |
|
629 | 630 |
ctrl.ZIndex = this.ZIndex; |
631 |
ctrl.GroupID = this.GroupID; |
|
630 | 632 |
|
631 | 633 |
return "|DZ|" + JsonSerializerHelper.CompressString((ctrl.JsonSerialize())); |
632 | 634 |
}; |
... | ... | |
660 | 662 |
EndPoint = s.EndPoint, |
661 | 663 |
//PointC = s.PointC, |
662 | 664 |
Memo = s.Memo, |
663 |
ZIndex = s.ZIndex |
|
665 |
ZIndex = s.ZIndex, |
|
666 |
GroupID = s.GroupID |
|
664 | 667 |
}; |
665 | 668 |
} |
666 | 669 |
} |
MarkupToPDF/Controls/Polygon/PolygonControl.cs | ||
---|---|---|
52 | 52 |
this.Paint = item.Paint; |
53 | 53 |
this.Memo = item.Memo; |
54 | 54 |
this.ZIndex = item.ZIndex; |
55 |
this.GroupID = item.GroupID; |
|
55 | 56 |
} |
56 | 57 |
} |
57 | 58 |
|
내보내기 Unified diff