개정판 873011c4
Fix: Undo/Redo 수정 진행
Change-Id: I3392d0ebc877626804a7c5d139d0b31a1942df7d
KCOM/Common/SelectionSet.cs | ||
---|---|---|
152 | 152 |
var vUndoBeforeTargetItem = |
153 | 153 |
ViewerDataModel.Instance.UndoDataList.ToList().OrderBy(x => x.EventTime).LastOrDefault(); |
154 | 154 |
|
155 |
if (vUndoBeforeTargetItem != null && vUndoBeforeTargetItem.Event == Event_Type.Thumb)
|
|
155 |
if (vUndoBeforeTargetItem != null && vUndoBeforeTargetItem.Event == EventType.Operation)
|
|
156 | 156 |
{ |
157 | 157 |
|
158 | 158 |
} |
159 | 159 |
else |
160 | 160 |
{ |
161 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
161 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
162 | 162 |
{ |
163 | 163 |
IsUndo = false, |
164 |
Event = Event_Type.Create,
|
|
164 |
Event = EventType.Create, |
|
165 | 165 |
EventTime = DateTime.Now, |
166 |
Markup_List = new List<Multi_Undo_data>()
|
|
166 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
167 | 167 |
}; |
168 | 168 |
|
169 |
var multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control);
|
|
170 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
169 |
var multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control); |
|
170 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
171 | 171 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
172 | 172 |
} |
173 | 173 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList(); |
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
126 | 126 |
////강인구 추가 |
127 | 127 |
//private List<Check_Inferface> check_Item = new List<Check_Inferface>(); |
128 | 128 |
private ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> document_Info = new ObservableCollection<KCOMDataModel.DataModel.DOCPAGE>(); |
129 |
private ObservableCollection<Undo_data> undoDataList = new ObservableCollection<Undo_data>();
|
|
129 |
private ObservableCollection<UndoDataGroup> undoDataList = new ObservableCollection<UndoDataGroup>();
|
|
130 | 130 |
|
131 | 131 |
//public UndoDataList { get; set; } |
132 | 132 |
|
... | ... | |
793 | 793 |
} |
794 | 794 |
} |
795 | 795 |
|
796 |
public ObservableCollection<Undo_data> UndoDataList
|
|
796 |
public ObservableCollection<UndoDataGroup> UndoDataList
|
|
797 | 797 |
{ |
798 | 798 |
get |
799 | 799 |
{ |
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
1202 | 1202 |
} |
1203 | 1203 |
|
1204 | 1204 |
|
1205 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == Event_Type.Thumb))
|
|
1205 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb)) |
|
1206 | 1206 |
//{ |
1207 | 1207 |
// return; |
1208 | 1208 |
//} |
1209 | 1209 |
|
1210 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List != null))
|
|
1210 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null))
|
|
1211 | 1211 |
//{ |
1212 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List.Count > 0)
|
|
1212 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
|
|
1213 | 1213 |
// { |
1214 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List.FirstOrDefault().PointSet != null)
|
|
1214 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
|
|
1215 | 1215 |
// { |
1216 | 1216 |
// return; |
1217 | 1217 |
// } |
... | ... | |
1259 | 1259 |
{ |
1260 | 1260 |
return; |
1261 | 1261 |
} |
1262 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == Event_Type.Thumb))
|
|
1262 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb)) |
|
1263 | 1263 |
//{ |
1264 | 1264 |
// return; |
1265 | 1265 |
//} |
1266 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List != null))
|
|
1266 |
//if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null))
|
|
1267 | 1267 |
//{ |
1268 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List.Count > 0)
|
|
1268 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
|
|
1269 | 1269 |
// { |
1270 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List.FirstOrDefault().PointSet != null)
|
|
1270 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
|
|
1271 | 1271 |
// { |
1272 | 1272 |
// return; |
1273 | 1273 |
// } |
... | ... | |
1385 | 1385 |
(item.DrawingData as CommentUserInfo).OnTranslate(delta.X, delta.Y); |
1386 | 1386 |
|
1387 | 1387 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
1388 |
MarkupParser.MarkupToString((item.DrawingData as CommentUserInfo), App.ViewInfo.UserID), Event_Type.Thumb, null, null);
|
|
1388 |
MarkupParser.MarkupToString((item.DrawingData as CommentUserInfo), App.ViewInfo.UserID), EventType.Operation, null, null);
|
|
1389 | 1389 |
|
1390 | 1390 |
item.UpdateThumb(); |
1391 | 1391 |
} |
... | ... | |
1509 | 1509 |
})); |
1510 | 1510 |
} |
1511 | 1511 |
|
1512 |
/// <summary> |
|
1513 |
/// 객체 회전 시작 |
|
1514 |
/// </summary> |
|
1515 |
/// <param name="sender"></param> |
|
1516 |
/// <param name="e"></param> |
|
1512 | 1517 |
private void rotate_DragStarted(object sender, DragStartedEventArgs e) |
1513 | 1518 |
{ |
1514 | 1519 |
this.RotatedPoint = Mouse.GetPosition(this); /// 2018.05.09 added by humkyung |
... | ... | |
1528 | 1533 |
return; |
1529 | 1534 |
} |
1530 | 1535 |
|
1531 |
//if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == Event_Type.Thumb)
|
|
1536 |
//if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb) |
|
1532 | 1537 |
//{ |
1533 | 1538 |
// return; |
1534 | 1539 |
//} |
1535 | 1540 |
|
1536 |
//if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List != null)
|
|
1541 |
//if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null)
|
|
1537 | 1542 |
//{ |
1538 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List.Count > 0)
|
|
1543 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
|
|
1539 | 1544 |
// { |
1540 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Markup_List.FirstOrDefault().PointSet != null)
|
|
1545 |
// if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
|
|
1541 | 1546 |
// { |
1542 | 1547 |
// return; |
1543 | 1548 |
// } |
... | ... | |
1546 | 1551 |
|
1547 | 1552 |
var comments = (from drawing in this.Members |
1548 | 1553 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1549 |
//UndoCommand.Instance.Push(comments, this.AngleValue, this.angleValue); |
|
1550 | 1554 |
UndoCommand.Instance.Push(comments); |
1551 | 1555 |
} |
1552 | 1556 |
|
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
1191 | 1191 |
} |
1192 | 1192 |
} |
1193 | 1193 |
|
1194 |
public void MarkupListUpdate(MarkupReturn res, Event_Type eventType, string CommentID, MarkupInfoItem item)
|
|
1194 |
public void MarkupListUpdate(MarkupReturn res, EventType eventType, string CommentID, MarkupInfoItem item) |
|
1195 | 1195 |
{ |
1196 | 1196 |
if (MarkupInfoSmallList.Count == 0) |
1197 | 1197 |
{ |
... | ... | |
1219 | 1219 |
|
1220 | 1220 |
switch (eventType) |
1221 | 1221 |
{ |
1222 |
case Event_Type.Create:
|
|
1222 |
case EventType.Create: |
|
1223 | 1223 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
1224 | 1224 |
{ |
1225 | 1225 |
Id = res.CommentID, |
... | ... | |
1230 | 1230 |
UserName = App.UserName, |
1231 | 1231 |
}); |
1232 | 1232 |
break; |
1233 |
case Event_Type.Delete:
|
|
1233 |
case EventType.Delete: |
|
1234 | 1234 |
if(CommentID == null) //user information list delete btn |
1235 | 1235 |
{ |
1236 | 1236 |
foreach (var delItem in item.MarkupList) |
... | ... | |
1243 | 1243 |
MarkupInfoSmallList.RemoveAll(p => p.Id.Equals(CommentID)); |
1244 | 1244 |
} |
1245 | 1245 |
break; |
1246 |
case Event_Type.Thumb://이동 회전
|
|
1246 |
case EventType.Operation://이동 회전
|
|
1247 | 1247 |
MarkupInfoSmallList.RemoveAll(p => p.Id.Equals(res.CommentID)); |
1248 | 1248 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
1249 | 1249 |
{ |
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
498 | 498 |
} |
499 | 499 |
#endregion |
500 | 500 |
|
501 |
public Undo_data UndoData { get; set; }
|
|
501 |
public UndoDataGroup UndoData { get; set; }
|
|
502 | 502 |
/// <summary> |
503 | 503 |
/// place symbol which has given id to original position which is created |
504 | 504 |
/// </summary> |
... | ... | |
543 | 543 |
string[] delimiterChars = { "|DZ|" }; |
544 | 544 |
string[] data = Data_.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
545 | 545 |
|
546 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
547 |
UndoData = new Undo_data()
|
|
546 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
547 |
UndoData = new UndoDataGroup()
|
|
548 | 548 |
{ |
549 | 549 |
IsUndo = false, |
550 |
Event = Event_Type.Create,
|
|
550 |
Event = EventType.Create, |
|
551 | 551 |
EventTime = DateTime.Now, |
552 |
Markup_List = new List<Multi_Undo_data>()
|
|
552 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
553 | 553 |
}; |
554 | 554 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
555 | 555 |
{ |
... | ... | |
570 | 570 |
|
571 | 571 |
adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo); |
572 | 572 |
|
573 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
|
|
573 |
multi_UndoData = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
574 | 574 |
|
575 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
575 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
576 | 576 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
577 | 577 |
} |
578 | 578 |
} |
... | ... | |
686 | 686 |
currentControl.EndPoint, |
687 | 687 |
currentControl.TopRightPoint, |
688 | 688 |
}; |
689 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
690 |
UndoData = new Undo_data()
|
|
689 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
690 |
UndoData = new UndoDataGroup()
|
|
691 | 691 |
{ |
692 | 692 |
IsUndo = false, |
693 |
Event = Event_Type.Create,
|
|
693 |
Event = EventType.Create, |
|
694 | 694 |
EventTime = DateTime.Now, |
695 |
Markup_List = new List<Multi_Undo_data>()
|
|
695 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
696 | 696 |
}; |
697 | 697 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
698 | 698 |
{ |
699 | 699 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
700 | 700 |
}); |
701 | 701 |
|
702 |
//multi_Undo_Data = dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
703 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
704 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
702 |
//multi_UndoData = dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
703 |
multi_UndoData = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
704 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
705 | 705 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
706 | 706 |
|
707 | 707 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
... | ... | |
735 | 735 |
} |
736 | 736 |
} |
737 | 737 |
|
738 |
public Multi_Undo_data multi_Undo_Data;
|
|
738 |
public Multi_UndoData multi_UndoData;
|
|
739 | 739 |
private void ApplyDragSelectionRect() |
740 | 740 |
{ |
741 |
multi_Undo_Data = new Multi_Undo_data();
|
|
741 |
multi_UndoData = new Multi_UndoData();
|
|
742 | 742 |
|
743 |
UndoData = new Undo_data()
|
|
743 |
UndoData = new UndoDataGroup()
|
|
744 | 744 |
{ |
745 | 745 |
IsUndo = false, |
746 |
Event = Event_Type.Select,
|
|
746 |
Event = EventType.Operation,
|
|
747 | 747 |
EventTime = DateTime.Now, |
748 |
Markup_List = new List<Multi_Undo_data>()
|
|
748 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
749 | 749 |
}; |
750 | 750 |
|
751 | 751 |
this.ParentOfType<MainWindow>().dzMainMenu.dragSelectionBorder.Visibility = Visibility.Collapsed; |
... | ... | |
775 | 775 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
776 | 776 |
|
777 | 777 |
this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item); |
778 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
779 |
multi_Undo_Data = new Multi_Undo_data();
|
|
778 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
779 |
multi_UndoData = new Multi_UndoData();
|
|
780 | 780 |
if (item.GroupID > 0) |
781 | 781 |
{ |
782 | 782 |
|
KCOM/Events/CreateCommand.cs | ||
---|---|---|
63 | 63 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
64 | 64 |
}); |
65 | 65 |
|
66 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
66 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
67 | 67 |
{ |
68 | 68 |
IsUndo = false, |
69 |
Event = Event_Type.Create,
|
|
69 |
Event = EventType.Create, |
|
70 | 70 |
EventTime = DateTime.Now, |
71 |
Markup_List = new List<Multi_Undo_data>()
|
|
71 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
72 | 72 |
}; |
73 | 73 |
|
74 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data()
|
|
74 |
Multi_UndoData multi_UndoData = new Multi_UndoData()
|
|
75 | 75 |
{ |
76 | 76 |
Markup = control |
77 | 77 |
}; |
78 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
78 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
79 | 79 |
|
80 | 80 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
81 | 81 |
|
82 | 82 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
83 |
MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
83 |
MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
|
|
84 | 84 |
|
85 | 85 |
control.ApplyOverViewData(); |
86 | 86 |
} |
KCOM/Events/CutCommand.cs | ||
---|---|---|
65 | 65 |
string id = string.Empty; |
66 | 66 |
if (item?.GetType().Name == "AdornerFinal") |
67 | 67 |
{ |
68 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
68 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
69 | 69 |
{ |
70 | 70 |
IsUndo = false, |
71 |
Event = Event_Type.Delete,
|
|
71 |
Event = EventType.Delete, |
|
72 | 72 |
EventTime = DateTime.Now, |
73 |
Markup_List = new List<Multi_Undo_data>()
|
|
73 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
74 | 74 |
}; |
75 | 75 |
|
76 | 76 |
foreach (var InnerItem in (item as Controls.AdornerFinal).Members.Cast<Controls.AdornerMember>()) |
77 | 77 |
{ |
78 | 78 |
var comment = (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
79 | 79 |
|
80 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data()
|
|
80 |
Multi_UndoData multi_UndoData = new Multi_UndoData()
|
|
81 | 81 |
{ |
82 | 82 |
Markup = comment |
83 | 83 |
}; |
84 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
84 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
85 | 85 |
|
86 | 86 |
var data = MarkupParser.MarkupToString(comment, App.ViewInfo.UserID); |
87 | 87 |
|
... | ... | |
96 | 96 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_); |
97 | 97 |
|
98 | 98 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
99 |
null, Event_Type.Delete, data.CommentID, null);
|
|
99 |
null, EventType.Delete, data.CommentID, null); |
|
100 | 100 |
} |
101 | 101 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
102 | 102 |
Clipboard.SetText(MarkupData,TextDataFormat.Text); |
KCOM/Events/DeleteCommand.cs | ||
---|---|---|
56 | 56 |
/// <param name="comments"></param> |
57 | 57 |
public void Execute(ICollection<CommentUserInfo> comments) |
58 | 58 |
{ |
59 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
59 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
60 | 60 |
{ |
61 | 61 |
IsUndo = false, |
62 |
Event = Event_Type.Delete,
|
|
62 |
Event = EventType.Delete, |
|
63 | 63 |
EventTime = DateTime.Now, |
64 |
Markup_List = new List<Multi_Undo_data>()
|
|
64 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
65 | 65 |
}; |
66 | 66 |
|
67 | 67 |
foreach (var comment in comments) |
68 | 68 |
{ |
69 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data()
|
|
69 |
Multi_UndoData multi_UndoData = new Multi_UndoData()
|
|
70 | 70 |
{ |
71 | 71 |
Markup = comment |
72 | 72 |
}; |
73 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
73 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
74 | 74 |
|
75 | 75 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(comment); |
76 | 76 |
ViewerDataModel.Instance.MarkupControls.Remove(comment); |
... | ... | |
79 | 79 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_); |
80 | 80 |
|
81 | 81 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
82 |
null, Event_Type.Delete, MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID).CommentID, null);
|
|
82 |
null, EventType.Delete, MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID).CommentID, null);
|
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
109 | 109 |
|
110 | 110 |
if (AdonerList.Count > 0) |
111 | 111 |
{ |
112 |
Undo_data UndoData = new Undo_data()
|
|
112 |
UndoDataGroup UndoData = new UndoDataGroup()
|
|
113 | 113 |
{ |
114 | 114 |
IsUndo = false, |
115 |
Event = Event_Type.Option,
|
|
115 |
Event = EventType.Operation,
|
|
116 | 116 |
EventTime = DateTime.Now, |
117 | 117 |
paint = ViewerDataModel.Instance.paintSet, |
118 |
Markup_List = new List<Multi_Undo_data>()
|
|
118 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
119 | 119 |
}; |
120 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
120 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
121 | 121 |
|
122 | 122 |
foreach (AdornerMember InnerItem in AdonerList) |
123 | 123 |
{ |
124 |
multi_Undo_Data.PointSet = new List<Point>();
|
|
124 |
multi_UndoData.PointSet = new List<Point>(); |
|
125 | 125 |
|
126 | 126 |
if ((InnerItem.DrawingData as MarkupToPDF.Controls.Common.IShapeControl) != null) |
127 | 127 |
{ |
128 | 128 |
(InnerItem.DrawingData as MarkupToPDF.Controls.Common.IShapeControl).Paint = ViewerDataModel.Instance.paintSet; |
129 | 129 |
} |
130 | 130 |
|
131 |
multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
132 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
133 |
multi_Undo_Data = new Multi_Undo_data();
|
|
131 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
132 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
133 |
multi_UndoData = new Multi_UndoData();
|
|
134 | 134 |
} |
135 | 135 |
|
136 | 136 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
802 | 802 |
List<AdornerMember> AdonerList = GetAdornerItem(); |
803 | 803 |
if(AdonerList.Count > 0) |
804 | 804 |
{ |
805 |
Undo_data UndoData = new Undo_data()
|
|
805 |
UndoDataGroup UndoData = new UndoDataGroup()
|
|
806 | 806 |
{ |
807 | 807 |
IsUndo = false, |
808 |
Event = Event_Type.Option,
|
|
808 |
Event = EventType.Operation,
|
|
809 | 809 |
EventTime = DateTime.Now, |
810 | 810 |
Opacity = ViewerDataModel.Instance.ControlOpacity, |
811 |
Markup_List = new List<Multi_Undo_data>()
|
|
811 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
812 | 812 |
}; |
813 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
813 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
814 | 814 |
|
815 | 815 |
foreach (AdornerMember InnerItem in AdonerList) |
816 | 816 |
{ |
817 | 817 |
InnerItem.DrawingData.Opacity = ViewerDataModel.Instance.ControlOpacity; |
818 | 818 |
|
819 |
multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
820 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
821 |
multi_Undo_Data = new Multi_Undo_data();
|
|
819 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
820 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
821 |
multi_UndoData = new Multi_UndoData();
|
|
822 | 822 |
} |
823 | 823 |
|
824 | 824 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
839 | 839 |
List<AdornerMember> AdonerList = GetAdornerItem(); |
840 | 840 |
if (AdonerList.Count > 0) |
841 | 841 |
{ |
842 |
Undo_data UndoData = new Undo_data()
|
|
842 |
UndoDataGroup UndoData = new UndoDataGroup()
|
|
843 | 843 |
{ |
844 | 844 |
IsUndo = false, |
845 |
Event = Event_Type.Option,
|
|
845 |
Event = EventType.Operation,
|
|
846 | 846 |
EventTime = DateTime.Now, |
847 | 847 |
LineSize = ViewerDataModel.Instance.LineSize, |
848 |
Markup_List = new List<Multi_Undo_data>()
|
|
848 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
849 | 849 |
}; |
850 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
850 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
851 | 851 |
|
852 | 852 |
foreach (AdornerMember InnerItem in AdonerList) |
853 | 853 |
{ |
... | ... | |
937 | 937 |
} |
938 | 938 |
|
939 | 939 |
|
940 |
multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
941 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
942 |
multi_Undo_Data = new Multi_Undo_data();
|
|
940 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
941 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
942 |
multi_UndoData = new Multi_UndoData();
|
|
943 | 943 |
} |
944 | 944 |
|
945 | 945 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
965 | 965 |
if (AdonerList.Count > 0) |
966 | 966 |
{ |
967 | 967 |
|
968 |
Undo_data UndoData = new Undo_data()
|
|
968 |
UndoDataGroup UndoData = new UndoDataGroup()
|
|
969 | 969 |
{ |
970 | 970 |
IsUndo = false, |
971 |
Event = Event_Type.Option,
|
|
971 |
Event = EventType.Operation,
|
|
972 | 972 |
EventTime = DateTime.Now, |
973 | 973 |
Interval = ViewerDataModel.Instance.Interval, |
974 |
Markup_List = new List<Multi_Undo_data>()
|
|
974 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
975 | 975 |
}; |
976 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
976 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
977 | 977 |
|
978 | 978 |
foreach (AdornerMember InnerItem in AdonerList) |
979 | 979 |
{ |
... | ... | |
983 | 983 |
{ |
984 | 984 |
(InnerItem.DrawingData as MarkupToPDF.Controls.Line.LineControl).Interval = ViewerDataModel.Instance.Interval; |
985 | 985 |
|
986 |
multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
987 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
988 |
multi_Undo_Data = new Multi_Undo_data();
|
|
986 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
987 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
988 |
multi_UndoData = new Multi_UndoData();
|
|
989 | 989 |
} |
990 | 990 |
break; |
991 | 991 |
} |
... | ... | |
1011 | 1011 |
if (AdonerList.Count > 0) |
1012 | 1012 |
{ |
1013 | 1013 |
|
1014 |
//Undo_data UndoData = new Undo_data()
|
|
1014 |
//UndoData UndoData = new UndoData()
|
|
1015 | 1015 |
//{ |
1016 | 1016 |
// IsUndo = false, |
1017 |
// Event = Event_Type.Option,
|
|
1017 |
// Event = EventType.Option, |
|
1018 | 1018 |
// EventTime = DateTime.Now, |
1019 | 1019 |
// Interval = ViewerDataModel.Instance.Interval, |
1020 |
// Markup_List = new List<Multi_Undo_data>()
|
|
1020 |
// MarkupDataColl = new List<Multi_UndoData>()
|
|
1021 | 1021 |
//}; |
1022 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
1022 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
1023 | 1023 |
|
1024 | 1024 |
foreach (AdornerMember InnerItem in AdonerList) |
1025 | 1025 |
{ |
... | ... | |
1029 | 1029 |
{ |
1030 | 1030 |
(InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectCloudControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
1031 | 1031 |
|
1032 |
//multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
1033 |
//UndoData.Markup_List.Add(multi_Undo_Data);
|
|
1034 |
//multi_Undo_Data = new Multi_Undo_data();
|
|
1032 |
//multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
1033 |
//UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
1034 |
//multi_UndoData = new Multi_UndoData();
|
|
1035 | 1035 |
} |
1036 | 1036 |
break; |
1037 | 1037 |
case ("CloudControl"): |
1038 | 1038 |
{ |
1039 | 1039 |
(InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.CloudControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
1040 | 1040 |
|
1041 |
//multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
1042 |
//UndoData.Markup_List.Add(multi_Undo_Data);
|
|
1043 |
//multi_Undo_Data = new Multi_Undo_data();
|
|
1041 |
//multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
1042 |
//UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
1043 |
//multi_UndoData = new Multi_UndoData();
|
|
1044 | 1044 |
} |
1045 | 1045 |
break; |
1046 | 1046 |
} |
... | ... | |
1066 | 1066 |
ViewerDataModel.Instance.DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData; |
1067 | 1067 |
if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0) |
1068 | 1068 |
{ |
1069 |
Undo_data UndoData = new Undo_data()
|
|
1069 |
UndoDataGroup UndoData = new UndoDataGroup()
|
|
1070 | 1070 |
{ |
1071 | 1071 |
IsUndo = false, |
1072 |
Event = Event_Type.Option,
|
|
1072 |
Event = EventType.Operation,
|
|
1073 | 1073 |
EventTime = DateTime.Now, |
1074 | 1074 |
DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData, |
1075 |
Markup_List = new List<Multi_Undo_data>()
|
|
1075 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
1076 | 1076 |
}; |
1077 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
1077 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
1078 | 1078 |
|
1079 | 1079 |
foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children) |
1080 | 1080 |
{ |
... | ... | |
1156 | 1156 |
break; |
1157 | 1157 |
} |
1158 | 1158 |
|
1159 |
multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
1160 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
1161 |
multi_Undo_Data = new Multi_Undo_data();
|
|
1159 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
1160 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
1161 |
multi_UndoData = new Multi_UndoData();
|
|
1162 | 1162 |
} |
1163 | 1163 |
|
1164 | 1164 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
2788 | 2788 |
|
2789 | 2789 |
} |
2790 | 2790 |
|
2791 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
2791 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
2792 | 2792 |
CommentUserInfo currentControl { get; set; } |
2793 | 2793 |
private void Check_Closed(object sender, EventArgs e) |
2794 | 2794 |
{ |
... | ... | |
3108 | 3108 |
|
3109 | 3109 |
SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu); |
3110 | 3110 |
|
3111 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
3111 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
3112 | 3112 |
|
3113 | 3113 |
//강인구 Undo/Redo 보류 |
3114 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
3114 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
3115 | 3115 |
{ |
3116 | 3116 |
IsUndo = false, |
3117 |
Event = Event_Type.Create,
|
|
3117 |
Event = EventType.Create, |
|
3118 | 3118 |
EventTime = DateTime.Now, |
3119 |
Markup_List = new List<Multi_Undo_data>()
|
|
3119 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
3120 | 3120 |
}; |
3121 | 3121 |
|
3122 | 3122 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
... | ... | |
3136 | 3136 |
|
3137 | 3137 |
adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo); |
3138 | 3138 |
|
3139 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
|
|
3139 |
multi_UndoData = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
3140 | 3140 |
|
3141 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
3141 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
3142 | 3142 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
3143 | 3143 |
} |
3144 | 3144 |
} |
... | ... | |
3168 | 3168 |
{ |
3169 | 3169 |
try |
3170 | 3170 |
{ |
3171 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
3171 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
3172 | 3172 |
|
3173 | 3173 |
//강인구 Undo/Redo 보류 |
3174 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
3174 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
3175 | 3175 |
{ |
3176 | 3176 |
IsUndo = false, |
3177 |
Event = Event_Type.Create,
|
|
3177 |
Event = EventType.Create, |
|
3178 | 3178 |
EventTime = DateTime.Now, |
3179 |
Markup_List = new List<Multi_Undo_data>()
|
|
3179 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
3180 | 3180 |
}; |
3181 | 3181 |
|
3182 | 3182 |
|
... | ... | |
3251 | 3251 |
currentControl.TopRightPoint, |
3252 | 3252 |
}; |
3253 | 3253 |
|
3254 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
3255 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
3254 |
multi_UndoData = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
3255 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
3256 | 3256 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
3257 | 3257 |
|
3258 | 3258 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
KCOM/Events/PasteCommand.cs | ||
---|---|---|
68 | 68 |
{ |
69 | 69 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
70 | 70 |
|
71 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
71 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
72 | 72 |
|
73 | 73 |
//강인구 Undo/Redo 보류 |
74 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
74 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
75 | 75 |
{ |
76 | 76 |
IsUndo = false, |
77 |
Event = Event_Type.Create,
|
|
77 |
Event = EventType.Create, |
|
78 | 78 |
EventTime = DateTime.Now, |
79 |
Markup_List = new List<Multi_Undo_data>()
|
|
79 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
80 | 80 |
}; |
81 | 81 |
|
82 | 82 |
foreach (string parse in data) |
... | ... | |
101 | 101 |
|
102 | 102 |
//CreateCommand.Instance.Execute(control); |
103 | 103 |
adornerSet.Add(control); |
104 |
multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control);
|
|
105 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
104 |
multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control); |
|
105 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
106 | 106 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
107 | 107 |
|
108 | 108 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList(); |
109 | 109 |
//ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
110 | 110 |
|
111 | 111 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
112 |
MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
112 |
MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
|
|
113 | 113 |
} |
114 | 114 |
} |
115 | 115 |
|
... | ... | |
127 | 127 |
{ |
128 | 128 |
try |
129 | 129 |
{ |
130 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
130 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
131 | 131 |
|
132 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
132 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
133 | 133 |
{ |
134 | 134 |
IsUndo = false, |
135 |
Event = Event_Type.Create,
|
|
135 |
Event = EventType.Create, |
|
136 | 136 |
EventTime = DateTime.Now, |
137 |
Markup_List = new List<Multi_Undo_data>()
|
|
137 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
138 | 138 |
}; |
139 | 139 |
|
140 | 140 |
string temppath = System.IO.Path.GetTempPath(); |
... | ... | |
209 | 209 |
currentControl.TopRightPoint, |
210 | 210 |
}; |
211 | 211 |
|
212 |
multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
213 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
212 |
multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
213 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
214 | 214 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
215 | 215 |
|
216 | 216 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
... | ... | |
224 | 224 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
225 | 225 |
|
226 | 226 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
227 |
MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
227 |
MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
|
|
228 | 228 |
} |
229 | 229 |
catch (Exception ex) |
230 | 230 |
{ |
... | ... | |
246 | 246 |
|
247 | 247 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
248 | 248 |
|
249 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
249 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
250 | 250 |
|
251 | 251 |
//강인구 Undo/Redo 보류 |
252 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
252 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
253 | 253 |
{ |
254 | 254 |
IsUndo = false, |
255 |
Event = Event_Type.Create,
|
|
255 |
Event = EventType.Create, |
|
256 | 256 |
EventTime = DateTime.Now, |
257 |
Markup_List = new List<Multi_Undo_data>()
|
|
257 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
258 | 258 |
}; |
259 | 259 |
|
260 | 260 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
... | ... | |
284 | 284 |
|
285 | 285 |
adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo); |
286 | 286 |
|
287 |
multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
|
|
287 |
multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
288 | 288 |
|
289 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
289 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
290 | 290 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
291 | 291 |
|
292 | 292 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
293 |
MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
293 |
MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
|
|
294 | 294 |
|
295 | 295 |
(item as MarkupToPDF.Common.CommentUserInfo).ApplyOverViewData(); |
296 | 296 |
} |
... | ... | |
309 | 309 |
{ |
310 | 310 |
try |
311 | 311 |
{ |
312 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
312 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
313 | 313 |
|
314 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
314 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
|
|
315 | 315 |
{ |
316 | 316 |
IsUndo = false, |
317 |
Event = Event_Type.Create,
|
|
317 |
Event = EventType.Create, |
|
318 | 318 |
EventTime = DateTime.Now, |
319 |
Markup_List = new List<Multi_Undo_data>()
|
|
319 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
320 | 320 |
}; |
321 | 321 |
|
322 | 322 |
string temppath = System.IO.Path.GetTempPath(); |
... | ... | |
391 | 391 |
currentControl.TopRightPoint, |
392 | 392 |
}; |
393 | 393 |
|
394 |
multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
395 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
394 |
multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
395 |
UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
396 | 396 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
397 | 397 |
|
398 | 398 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
... | ... | |
406 | 406 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
407 | 407 |
|
408 | 408 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
409 |
MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
409 |
MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
|
|
410 | 410 |
} |
411 | 411 |
catch (Exception ex) |
412 | 412 |
{ |
KCOM/Events/RedoCommand.cs | ||
---|---|---|
47 | 47 |
public void Execute() |
48 | 48 |
{ |
49 | 49 |
AdornerFinal final; |
50 |
Undo_data redo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo).ToList()
|
|
50 |
UndoDataGroup redo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo).ToList()
|
|
51 | 51 |
.OrderBy(order => order.EventTime).FirstOrDefault(); |
52 | 52 |
if (redo == null) return; |
53 | 53 |
|
54 | 54 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
55 | 55 |
switch (redo.Event) |
56 | 56 |
{ |
57 |
case (Event_Type.Create):
|
|
57 |
case (EventType.Create): |
|
58 | 58 |
{ |
59 |
foreach (var item in redo.Markup_List)
|
|
59 |
foreach (var item in redo.MarkupDataColl)
|
|
60 | 60 |
{ |
61 | 61 |
ViewerDataModel.Instance.MarkupControls_USER.Add(item.Markup); |
62 | 62 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
63 |
MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
63 |
MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), EventType.Create, null, null); |
|
64 | 64 |
} |
65 | 65 |
} |
66 | 66 |
break; |
67 |
case (Event_Type.Delete):
|
|
67 |
case (EventType.Delete): |
|
68 | 68 |
{ |
69 |
foreach (var item in redo.Markup_List)
|
|
69 |
foreach (var item in redo.MarkupDataColl)
|
|
70 | 70 |
{ |
71 | 71 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item.Markup); |
72 | 72 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
73 |
null, Event_Type.Delete, item.Markup.CommentID, null);
|
|
73 |
null, EventType.Delete, item.Markup.CommentID, null); |
|
74 | 74 |
} |
75 | 75 |
} |
76 | 76 |
break; |
77 |
case (Event_Type.Thumb):
|
|
77 |
case (EventType.Operation):
|
|
78 | 78 |
{ |
79 | 79 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
80 | 80 |
|
81 |
foreach (var item in redo.Markup_List)
|
|
81 |
foreach (var item in redo.MarkupDataColl)
|
|
82 | 82 |
{ |
83 | 83 |
double dOriAngle = 0.0; |
84 | 84 |
List<Point> lstOriPointSet = new List<Point>(); |
... | ... | |
130 | 130 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
131 | 131 |
} |
132 | 132 |
break; |
133 |
case (Event_Type.Select): |
|
133 |
/* |
|
134 |
case (EventType.Select): |
|
134 | 135 |
{ |
135 | 136 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
136 | 137 |
|
137 |
foreach (var item in redo.Markup_List)
|
|
138 |
foreach (var item in redo.MarkupDataColl)
|
|
138 | 139 |
{ |
139 | 140 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item.Markup); |
140 | 141 |
|
... | ... | |
161 | 162 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
162 | 163 |
} |
163 | 164 |
break; |
164 |
case (Event_Type.Option): |
|
165 |
*/ |
|
166 |
/* |
|
167 |
case (EventType.Option): |
|
165 | 168 |
{ |
166 | 169 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
167 | 170 |
|
168 |
foreach (var item in redo.Markup_List)
|
|
171 |
foreach (var item in redo.MarkupDataColl)
|
|
169 | 172 |
{ |
170 | 173 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item.Markup); |
171 | 174 |
if (redo.LineSize != 0 && item.Markup as IPath != null) |
... | ... | |
194 | 197 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
195 | 198 |
} |
196 | 199 |
break; |
200 |
*/ |
|
197 | 201 |
} |
198 | 202 |
|
199 | 203 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == redo.EventTime).ToList() |
KCOM/Events/UndoCommand.cs | ||
---|---|---|
49 | 49 |
/// <param name="comments"></param> |
50 | 50 |
//public void Push(ICollection<CommentUserInfo> comments, double dAngle, double dBeforeAngle = 0.0, List<Point> lstBeforePointSet = null) |
51 | 51 |
//{ |
52 |
// Undo_data UndoData = new Undo_data()
|
|
52 |
// UndoData UndoData = new UndoData()
|
|
53 | 53 |
// { |
54 | 54 |
// IsUndo = false, |
55 |
// Event = Event_Type.Thumb,
|
|
55 |
// Event = EventType.Thumb, |
|
56 | 56 |
// EventTime = DateTime.Now, |
57 |
// Markup_List = new List<Multi_Undo_data>(),
|
|
57 |
// MarkupDataColl = new List<Multi_UndoData>(),
|
|
58 | 58 |
// }; |
59 | 59 |
|
60 |
// Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
60 |
// Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
61 | 61 |
|
62 | 62 |
// foreach (var comment in comments) |
63 | 63 |
// { |
64 |
// multi_Undo_Data.PointSet = new List<Point>();
|
|
64 |
// multi_UndoData.PointSet = new List<Point>(); |
|
65 | 65 |
// var p_set = new List<Point>(); |
66 | 66 |
|
67 | 67 |
// if (comment is TextControl) |
68 | 68 |
// { |
69 |
// multi_Undo_Data.PointSet.Add((comment as TextControl).StartPoint);
|
|
70 |
// multi_Undo_Data.PointSet.Add((comment as TextControl).EndPoint);
|
|
69 |
// multi_UndoData.PointSet.Add((comment as TextControl).StartPoint); |
|
70 |
// multi_UndoData.PointSet.Add((comment as TextControl).EndPoint); |
|
71 | 71 |
// } |
72 | 72 |
|
73 | 73 |
// foreach (var point in (comment as IPath).PointSet) |
74 | 74 |
// { |
75 |
// multi_Undo_Data.PointSet.Add(point);
|
|
75 |
// multi_UndoData.PointSet.Add(point); |
|
76 | 76 |
// } |
77 | 77 |
|
78 | 78 |
// if (lstBeforePointSet != null) |
79 |
// multi_Undo_Data.BeforePointSet = lstBeforePointSet;
|
|
79 |
// multi_UndoData.BeforePointSet = lstBeforePointSet; |
|
80 | 80 |
|
81 | 81 |
// if (comment is ArrowTextControl) |
82 | 82 |
// { |
83 |
// //multi_Undo_Data.Angle = dAngle = (comment as ArrowTextControl).CommentAngle;
|
|
84 |
// multi_Undo_Data.Angle = dAngle;
|
|
85 |
// multi_Undo_Data.BeforeAngle = dBeforeAngle;
|
|
83 |
// //multi_UndoData.Angle = dAngle = (comment as ArrowTextControl).CommentAngle; |
|
84 |
// multi_UndoData.Angle = dAngle; |
|
85 |
// multi_UndoData.BeforeAngle = dBeforeAngle; |
|
86 | 86 |
// } |
87 | 87 |
// else |
88 | 88 |
// { |
89 |
// multi_Undo_Data.Angle = dAngle;
|
|
90 |
// multi_Undo_Data.BeforeAngle = dBeforeAngle;
|
|
89 |
// multi_UndoData.Angle = dAngle; |
|
90 |
// multi_UndoData.BeforeAngle = dBeforeAngle; |
|
91 | 91 |
// } |
92 | 92 |
|
93 |
// multi_Undo_Data.Markup = comment;
|
|
94 |
// UndoData.Markup_List.Add(multi_Undo_Data);
|
|
93 |
// multi_UndoData.Markup = comment; |
|
94 |
// UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
95 | 95 |
// ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
96 |
// MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Thumb, null, null);
|
|
96 |
// MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Thumb, null, null);
|
|
97 | 97 |
|
98 |
// multi_Undo_Data = new Multi_Undo_data();
|
|
98 |
// multi_UndoData = new Multi_UndoData();
|
|
99 | 99 |
// } |
100 | 100 |
// ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
101 | 101 |
// { |
... | ... | |
107 | 107 |
|
108 | 108 |
public void Push(ICollection<CommentUserInfo> comments) |
109 | 109 |
{ |
110 |
Undo_data UndoData = new Undo_data()
|
|
110 |
UndoDataGroup UndoData = new UndoDataGroup()
|
|
111 | 111 |
{ |
112 | 112 |
IsUndo = false, |
113 |
Event = Event_Type.Thumb,
|
|
113 |
Event = EventType.Operation,
|
|
114 | 114 |
EventTime = DateTime.Now, |
115 |
Markup_List = new List<Multi_Undo_data>(),
|
|
115 |
MarkupDataColl = new List<Multi_UndoData>(),
|
|
116 | 116 |
}; |
117 | 117 |
|
118 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
|
119 |
|
|
120 | 118 |
foreach (var comment in comments) |
121 | 119 |
{ |
122 |
multi_Undo_Data.PointSet = new List<Point>(); |
|
120 |
Multi_UndoData multi_UndoData = new Multi_UndoData(); |
|
121 |
multi_UndoData.Markup = comment; |
|
122 |
multi_UndoData.Clone = comment.Clone(); |
|
123 |
/* |
|
124 |
multi_UndoData.PointSet = new List<Point>(); |
|
123 | 125 |
var p_set = new List<Point>(); |
124 | 126 |
|
125 | 127 |
if (comment is TextControl) |
126 | 128 |
{ |
127 |
multi_Undo_Data.PointSet.Add((comment as TextControl).StartPoint);
|
|
128 |
multi_Undo_Data.PointSet.Add((comment as TextControl).EndPoint);
|
|
129 |
multi_UndoData.PointSet.Add((comment as TextControl).StartPoint); |
|
130 |
multi_UndoData.PointSet.Add((comment as TextControl).EndPoint); |
|
129 | 131 |
} |
130 | 132 |
|
131 | 133 |
foreach (var point in (comment as IPath).PointSet) |
132 | 134 |
{ |
133 |
multi_Undo_Data.PointSet.Add(point);
|
|
135 |
multi_UndoData.PointSet.Add(point); |
|
134 | 136 |
} |
135 | 137 |
|
136 | 138 |
|
... | ... | |
139 | 141 |
{ |
140 | 142 |
points.Add(point); |
141 | 143 |
} |
142 |
multi_Undo_Data.PointSet = points;
|
|
144 |
multi_UndoData.PointSet = points; |
|
143 | 145 |
|
144 | 146 |
if (comment is ArrowTextControl) |
145 | 147 |
{ |
146 |
//multi_Undo_Data.Angle = dAngle = (comment as ArrowTextControl).CommentAngle;
|
|
147 |
multi_Undo_Data.Angle = comment.CommentAngle;
|
|
148 |
//multi_UndoData.Angle = dAngle = (comment as ArrowTextControl).CommentAngle; |
|
149 |
multi_UndoData.Angle = comment.CommentAngle; |
|
148 | 150 |
} |
149 | 151 |
else |
150 | 152 |
{ |
151 |
multi_Undo_Data.Angle = comment.CommentAngle;
|
|
153 |
multi_UndoData.Angle = comment.CommentAngle; |
|
152 | 154 |
} |
153 | 155 |
|
154 |
multi_Undo_Data.Markup = comment; |
|
155 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
156 |
multi_UndoData.Markup = comment; |
|
157 |
*/ |
|
158 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
|
156 | 159 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
157 |
MarkupParser.MarkupToString(multi_Undo_Data.Markup, App.ViewInfo.UserID), Event_Type.Thumb, null, null); |
|
158 |
|
|
159 |
multi_Undo_Data = new Multi_Undo_data(); |
|
160 |
MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Operation, null, null); |
|
160 | 161 |
} |
161 | 162 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
162 | 163 |
{ |
... | ... | |
174 | 175 |
AdornerFinal final; |
175 | 176 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
176 | 177 |
|
177 |
Undo_data undo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == false).ToList()
|
|
178 |
UndoDataGroup undo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == false).ToList()
|
|
178 | 179 |
.OrderByDescending(order => order.EventTime).FirstOrDefault(); |
179 | 180 |
if (undo == null) return; |
180 | 181 |
|
181 | 182 |
switch (undo.Event) |
182 | 183 |
{ |
183 |
case (Event_Type.Create):
|
|
184 |
case (EventType.Create): |
|
184 | 185 |
{ |
185 |
foreach (var item in undo.Markup_List)
|
|
186 |
foreach (var item in undo.MarkupDataColl)
|
|
186 | 187 |
{ |
187 | 188 |
ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup)); |
188 | 189 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
189 |
null, Event_Type.Delete, item.Markup.CommentID, null);
|
|
190 |
null, EventType.Delete, item.Markup.CommentID, null); |
|
190 | 191 |
} |
191 | 192 |
} |
192 | 193 |
break; |
193 |
case (Event_Type.Delete):
|
|
194 |
case (EventType.Delete): |
|
194 | 195 |
{ |
195 |
foreach (var item in undo.Markup_List)
|
|
196 |
foreach (var item in undo.MarkupDataColl)
|
|
196 | 197 |
{ |
197 | 198 |
//var markupitem = MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID); |
198 | 199 |
|
... | ... | |
218 | 219 |
|
219 | 220 |
ViewerDataModel.Instance.MarkupControls_USER.Add(item.Markup); |
220 | 221 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
221 |
MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), Event_Type.Create, null, null);
|
|
222 |
MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), EventType.Create, null, null); |
|
222 | 223 |
} |
223 | 224 |
} |
224 | 225 |
break; |
225 |
case (Event_Type.Thumb):
|
|
226 |
case (EventType.Operation):
|
|
226 | 227 |
{ |
227 | 228 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
228 | 229 |
|
229 |
foreach (var item in undo.Markup_List)
|
|
230 |
foreach (var item in undo.MarkupDataColl)
|
|
230 | 231 |
{ |
231 | 232 |
double dOriAngle = 0.0; |
232 | 233 |
List<Point> lstOriPointSet = new List<Point>(); |
... | ... | |
239 | 240 |
(item.Markup as IViewBox).CommentAngle = item.Angle; |
240 | 241 |
item.Angle = dOriAngle; |
241 | 242 |
} |
242 |
if ((item.Markup as TextControl) != null) |
|
243 |
{ |
|
244 |
dOriAngle = (item.Markup as TextControl).CommentAngle; |
|
245 |
(item.Markup as TextControl).CommentAngle = item.Angle; |
|
246 |
item.Angle = dOriAngle; |
|
247 |
//(item.Markup as TextControl).CommentAngle = item.BeforeAngle; |
|
248 |
if (item.PointSet.Count > 0) |
|
249 |
{ |
|
250 |
foreach(var point in (item.Markup as IPath).PointSet) |
|
251 |
{ |
|
252 |
lstOriPointSet.Add(point); |
|
253 |
} |
|
254 |
Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X); |
|
255 |
Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y); |
|
256 |
item.PointSet = lstOriPointSet; |
|
257 |
} |
|
258 |
} |
|
259 | 243 |
else |
260 | 244 |
{ |
261 |
dOriAngle = (item.Markup).CommentAngle; |
|
262 |
(item.Markup).CommentAngle = item.Angle; |
|
263 |
foreach (var point in (item.Markup as IPath).PointSet) |
|
264 |
{ |
|
265 |
lstOriPointSet.Add(point); |
|
266 |
} |
|
267 |
(item.Markup as IPath).PointSet = item.PointSet; |
|
268 |
item.PointSet = lstOriPointSet; |
|
245 |
///(item.Markup).CommentAngle = item.Angle; |
|
246 |
///(item.Markup as IPath).PointSet = item.PointSet; |
|
269 | 247 |
///(item.Markup as IPath).PointSet = item.BeforePointSet != null ? item.BeforePointSet : new List<Point>(); |
248 |
item.Markup.Copy(item.Clone); |
|
270 | 249 |
(item.Markup as CommentUserInfo).UpdateControl(); |
271 | 250 |
} |
272 | 251 |
|
... | ... | |
277 | 256 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
278 | 257 |
} |
279 | 258 |
break; |
280 |
case (Event_Type.Select): |
|
259 |
/* |
|
260 |
case (EventType.Select): |
|
281 | 261 |
{ |
282 | 262 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
283 | 263 |
|
284 |
foreach (var item in undo.Markup_List)
|
|
264 |
foreach (var item in undo.MarkupDataColl)
|
|
285 | 265 |
{ |
286 | 266 |
ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup)); |
287 | 267 |
|
... | ... | |
309 | 289 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
310 | 290 |
} |
311 | 291 |
break; |
312 |
case (Event_Type.Option):
|
|
292 |
case (EventType.Option): |
|
313 | 293 |
{ |
314 | 294 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
315 | 295 |
|
316 |
foreach (var item in undo.Markup_List)
|
|
296 |
foreach (var item in undo.MarkupDataColl)
|
|
317 | 297 |
{ |
318 | 298 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item.Markup); |
319 | 299 |
|
... | ... | |
343 | 323 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
344 | 324 |
} |
345 | 325 |
break; |
326 |
*/ |
|
346 | 327 |
} |
347 | 328 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == undo.EventTime).ToList() |
348 | 329 |
.OrderByDescending(order => order.EventTime).ToList().ForEach(i => |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
118 | 118 |
|
119 | 119 |
private BitmapFrame tempPageImage =null; |
120 | 120 |
|
121 |
public Undo_data UndoData { get; set; }
|
|
121 |
public UndoDataGroup UndoDataGroup { get; set; }
|
|
122 | 122 |
public CommentUserInfo previousControl { get; set; } |
123 | 123 |
public CommentUserInfo currentControl { get; set; } |
124 | 124 |
public ControlType controlType { get; set; } |
... | ... | |
151 | 151 |
public string Filename_ { get; set; } |
152 | 152 |
public double L_Size = 0; |
153 | 153 |
public AdornerFinal adorner_; |
154 |
public Multi_Undo_data multi_Undo_Data;
|
|
154 |
public Multi_UndoData multi_UndoData;
|
|
155 | 155 |
public string Symbol_ID = ""; |
156 | 156 |
|
157 | 157 |
/// <summary> |
... | ... | |
399 | 399 |
{ |
400 | 400 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(a); |
401 | 401 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
402 |
null, Event_Type.Delete, a.CommentID, null);
|
|
402 |
null, EventType.Delete, a.CommentID, null); |
|
403 | 403 |
}); |
404 | 404 |
|
405 | 405 |
ViewerDataModel.Instance.MyMarkupList.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a => |
... | ... | |
944 | 944 |
//SetTextControl(txtOriginator); |
945 | 945 |
//SetTextControl(txtDate); |
946 | 946 |
|
947 |
//multi_Undo_Data = new Multi_Undo_data();
|
|
947 |
//multi_UndoData = new Multi_UndoData();
|
|
948 | 948 |
|
949 |
//MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
|
|
949 |
//MarkupToPDF.Common.UndoData UndoData = new UndoData()
|
|
950 | 950 |
//{ |
951 | 951 |
// IsUndo = false, |
952 |
// Event = Event_Type.Create,
|
|
952 |
// Event = EventType.Create, |
|
953 | 953 |
// EventTime = DateTime.Now, |
954 |
// Markup_List = new List<Multi_Undo_data>()
|
|
954 |
// MarkupDataColl = new List<Multi_UndoData>()
|
|
955 | 955 |
//}; |
956 | 956 |
|
957 |
//multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(symCtrl as MarkupToPDF.Common.CommentUserInfo);
|
|
958 |
//UndoData.Markup_List.Add(multi_Undo_Data);
|
|
957 |
//multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(symCtrl as MarkupToPDF.Common.CommentUserInfo); |
|
958 |
//UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
959 | 959 |
|
960 |
////multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtApproved as MarkupToPDF.Common.CommentUserInfo);
|
|
961 |
////UndoData.Markup_List.Add(multi_Undo_Data);
|
|
960 |
////multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtApproved as MarkupToPDF.Common.CommentUserInfo); |
|
961 |
////UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
962 | 962 |
|
963 |
////multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtCreator as MarkupToPDF.Common.CommentUserInfo);
|
|
964 |
////UndoData.Markup_List.Add(multi_Undo_Data);
|
|
963 |
////multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtCreator as MarkupToPDF.Common.CommentUserInfo); |
|
964 |
////UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
965 | 965 |
|
966 |
//multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtOriginator as MarkupToPDF.Common.CommentUserInfo);
|
|
967 |
//UndoData.Markup_List.Add(multi_Undo_Data);
|
|
966 |
//multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtOriginator as MarkupToPDF.Common.CommentUserInfo); |
|
967 |
//UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
968 | 968 |
|
969 |
//multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtDate as MarkupToPDF.Common.CommentUserInfo);
|
|
970 |
//UndoData.Markup_List.Add(multi_Undo_Data);
|
|
969 |
//multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtDate as MarkupToPDF.Common.CommentUserInfo); |
|
970 |
//UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
971 | 971 |
|
972 | 972 |
//ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
973 | 973 |
|
... | ... | |
2775 | 2775 |
currentControl.EndPoint, |
2776 | 2776 |
currentControl.TopRightPoint, |
2777 | 2777 |
}; |
2778 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
|
|
2779 |
UndoData = new Undo_data()
|
|
2778 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
2779 |
UndoDataGroup = new UndoDataGroup()
|
|
2780 | 2780 |
{ |
2781 | 2781 |
IsUndo = false, |
2782 |
Event = Event_Type.Create,
|
|
2782 |
Event = EventType.Create, |
|
2783 | 2783 |
EventTime = DateTime.Now, |
2784 |
Markup_List = new List<Multi_Undo_data>()
|
|
2784 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
2785 | 2785 |
}; |
2786 | 2786 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
2787 | 2787 |
{ |
2788 | 2788 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
2789 | 2789 |
}); |
2790 | 2790 |
|
2791 |
//multi_Undo_Data = dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
2792 |
multi_Undo_Data = Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
|
|
2793 |
UndoData.Markup_List.Add(multi_Undo_Data);
|
|
2794 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
2791 |
//multi_UndoData = dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
2792 |
multi_UndoData = Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
|
2793 |
UndoDataGroup.MarkupDataColl.Add(multi_UndoData);
|
|
2794 |
ViewerDataModel.Instance.UndoDataList.Add(UndoDataGroup);
|
|
2795 | 2795 |
|
2796 | 2796 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
2797 | 2797 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
6140 | 6140 |
|
6141 | 6141 |
#endregion 캡쳐 기능 |
6142 | 6142 |
|
6143 |
public Multi_Undo_data Control_Style(CommentUserInfo control)
|
|
6143 |
public Multi_UndoData Control_Style(CommentUserInfo control)
|
|
6144 | 6144 |
{ |
6145 |
multi_Undo_Data = new Multi_Undo_data();
|
|
6145 |
multi_UndoData = new Multi_UndoData();
|
|
6146 | 6146 |
|
6147 |
multi_Undo_Data.Markup = control;
|
|
6147 |
multi_UndoData.Markup = control; |
|
6148 | 6148 |
|
6149 | 6149 |
if (control is IShapeControl) |
6150 | 6150 |
{ |
6151 |
multi_Undo_Data.paint = (control as IShapeControl).Paint;
|
|
6151 |
multi_UndoData.paint = (control as IShapeControl).Paint; |
|
6152 | 6152 |
} |
6153 | 6153 |
if (control is IDashControl) |
6154 | 6154 |
{ |
6155 |
multi_Undo_Data.DashSize = (control as IDashControl).DashSize;
|
|
6155 |
multi_UndoData.DashSize = (control as IDashControl).DashSize; |
|
6156 | 6156 |
} |
6157 | 6157 |
if (control is IPath) |
6158 | 6158 |
{ |
6159 |
multi_Undo_Data.LineSize = (control as IPath).LineSize;
|
|
6159 |
multi_UndoData.LineSize = (control as IPath).LineSize; |
|
6160 | 6160 |
} |
6161 | 6161 |
if ((control as UIElement) != null) |
6162 | 6162 |
{ |
6163 |
multi_Undo_Data.Opacity = (control as UIElement).Opacity;
|
|
6163 |
multi_UndoData.Opacity = (control as UIElement).Opacity; |
|
6164 | 6164 |
} |
6165 | 6165 |
|
6166 |
return multi_Undo_Data;
|
|
6166 |
return multi_UndoData; |
|
6167 | 6167 |
} |
6168 | 6168 |
|
6169 | 6169 |
private async void Comment_Move(object sender, MouseButtonEventArgs e) |
MarkupToPDF/Common/CommentUserInfo.cs | ||
---|---|---|
41 | 41 |
Load(); |
42 | 42 |
} |
43 | 43 |
|
44 |
public virtual void Copy(CommentUserInfo lhs) { throw new NotImplementedException("Must implement Copy()"); } |
|
45 |
public virtual CommentUserInfo Clone() { throw new NotImplementedException("Must implement Clone()"); } |
|
46 |
|
|
44 | 47 |
public void Load() |
45 | 48 |
{ |
46 | 49 |
this.IsHitTestVisible = true; |
MarkupToPDF/Common/Undo_data.cs | ||
---|---|---|
8 | 8 |
|
9 | 9 |
namespace MarkupToPDF.Common |
10 | 10 |
{ |
11 |
//public class Undo_data : CommentUserInfo |
|
12 |
public class Undo_data |
|
11 |
public class Multi_UndoData |
|
13 | 12 |
{ |
14 |
public Event_Type Event { get; set; } |
|
15 |
public List<Multi_Undo_data> Markup_List { get; set; } |
|
16 |
public bool IsUndo { get; set; } |
|
17 |
public DateTime EventTime { get; set; } |
|
13 |
public CommentUserInfo Markup { get; set; } |
|
14 |
public CommentUserInfo Clone { get; set; } |
|
15 |
public List<Point> PointSet { get; set; } |
|
18 | 16 |
public double LineSize { get; set; } |
19 |
public double Interval { get; set; } |
|
20 | 17 |
public DoubleCollection DashSize { get; set; } |
21 | 18 |
public Double Opacity { get; set; } |
22 |
public MarkupToPDF.Controls.Common.PaintSet paint { get; set; } |
|
23 |
|
|
24 |
//public CommentUserInfo Markup { get; set; } |
|
25 |
//public List<CommentUserInfo> MarkupList { get; set; } |
|
26 |
//public bool IsAdorner { get; set; } |
|
27 |
//public bool IsUndo { get; set; } |
|
28 |
//public DateTime EventTime { get; set; } |
|
29 |
//public Event_Type Event { get; set; } |
|
30 |
//public List<Point> PointSet { get; set; } |
|
31 |
//public double Angle { get; set; } |
|
19 |
public Controls.Common.PaintSet paint { get; set; } |
|
20 |
public double Angle { get; set; } |
|
32 | 21 |
} |
33 | 22 |
|
34 |
public class Multi_Undo_data
|
|
23 |
public class UndoDataGroup
|
|
35 | 24 |
{ |
36 |
public CommentUserInfo Markup { get; set; } |
|
37 |
public List<Point> PointSet { get; set; } |
|
25 |
public EventType Event { get; set; } |
|
26 |
public List<Multi_UndoData> MarkupDataColl { get; set; } |
|
27 |
public bool IsUndo { get; set; } |
|
28 |
public DateTime EventTime { get; set; } |
|
38 | 29 |
public double LineSize { get; set; } |
30 |
public double Interval { get; set; } |
|
39 | 31 |
public DoubleCollection DashSize { get; set; } |
40 | 32 |
public Double Opacity { get; set; } |
41 |
public Controls.Common.PaintSet paint { get; set; } |
|
42 |
public double Angle { get; set; } |
|
33 |
public MarkupToPDF.Controls.Common.PaintSet paint { get; set; } |
|
43 | 34 |
} |
44 | 35 |
|
45 |
public enum Event_Type
|
|
36 |
public enum EventType |
|
46 | 37 |
{ |
47 | 38 |
Create, |
48 |
Select, |
|
49 |
Option, |
|
50 |
Thumb, |
|
51 |
//Move, |
|
52 |
//Rotate, |
|
53 |
//Resize, |
|
54 |
Delete |
|
39 |
Delete, |
|
40 |
Operation |
|
55 | 41 |
} |
56 | 42 |
} |
MarkupToPDF/Controls/Etc/DateControl.cs | ||
---|---|---|
15 | 15 |
using MarkupToPDF.Serialize.Core; |
16 | 16 |
using MarkupToPDF.Serialize.S_Control; |
17 | 17 |
using System.Linq; |
18 |
using System.Windows.Markup; |
|
18 | 19 |
|
19 | 20 |
namespace MarkupToPDF.Controls.Etc |
20 | 21 |
{ |
21 |
public class DateControl : CommentUserInfo, IDisposable, IPath, INotifyPropertyChanged, IViewBox, IMarkupCommonData
|
|
22 |
public class DateControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IViewBox
|
|
22 | 23 |
{ |
23 | 24 |
private const string PART_ViewBox = "PART_ViewBox"; |
24 | 25 |
private const string PART_TextBox = "PART_TextBox"; |
... | ... | |
40 | 41 |
//this.DefaultStyleKey = typeof(DateControl); |
41 | 42 |
} |
42 | 43 |
|
44 |
/// <summary> |
|
45 |
/// 복사본을 생성한다. |
|
46 |
/// </summary> |
|
47 |
/// <returns></returns> |
|
48 |
public override CommentUserInfo Clone() |
|
49 |
{ |
|
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), |
내보내기 Unified diff