개정판 b79d6e7f
Fix: ArrowTextControl, TextControl에 ArcLength 적용
Change-Id: I02e837c6e9e97fc48008ee3753012f8025414ffb
KCOM/Common/SelectionSet.cs | ||
---|---|---|
163 | 163 |
IsUndo = false, |
164 | 164 |
Event = EventType.Create, |
165 | 165 |
EventTime = DateTime.Now, |
166 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
166 |
MarkupDataColl = new List<UndoData>() |
|
167 | 167 |
}; |
168 | 168 |
|
169 | 169 |
var multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control); |
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
755 | 755 |
} |
756 | 756 |
else |
757 | 757 |
{ |
758 |
|
|
759 |
LineSize = ((dynamic)currentControl).LineSize; |
|
760 |
|
|
761 |
//if (item.DrawingData.GetType().Name == "TriControl") |
|
762 |
// LineSize = ((MarkupToPDF.Controls.Shape.TriControl)currentControl).LineSize; |
|
763 |
//else if(item.DrawingData.GetType().Name == "RectangleControl") |
|
764 |
// LineSize = ((MarkupToPDF.Controls.Shape.RectangleControl)currentControl).LineSize; |
|
765 |
//else if (item.DrawingData.GetType().Name == "RectCloudControl") |
|
766 |
// LineSize = ((MarkupToPDF.Controls.Shape.RectCloudControl)currentControl).LineSize; |
|
767 |
//else if (item.DrawingData.GetType().Name == "CloudControl") |
|
768 |
// LineSize = ((MarkupToPDF.Controls.Polygon.CloudControl)currentControl).LineSize; |
|
769 |
//else if (item.DrawingData.GetType().Name == "PolygonControl") |
|
770 |
// LineSize = ((MarkupToPDF.Controls.Polygon.PolygonControl)currentControl).LineSize; |
|
758 |
if(item.DrawingData.GetType().Name == "TriControl") |
|
759 |
LineSize = ((MarkupToPDF.Controls.Shape.TriControl)currentControl).LineSize; |
|
760 |
else if(item.DrawingData.GetType().Name == "RectangleControl") |
|
761 |
LineSize = ((MarkupToPDF.Controls.Shape.RectangleControl)currentControl).LineSize; |
|
762 |
else if (item.DrawingData.GetType().Name == "RectCloudControl") |
|
763 |
LineSize = ((MarkupToPDF.Controls.Shape.RectCloudControl)currentControl).LineSize; |
|
764 |
else if (item.DrawingData.GetType().Name == "CloudControl") |
|
765 |
LineSize = ((MarkupToPDF.Controls.Polygon.CloudControl)currentControl).LineSize; |
|
766 |
else if (item.DrawingData.GetType().Name == "PolygonControl") |
|
767 |
LineSize = ((MarkupToPDF.Controls.Polygon.PolygonControl)currentControl).LineSize; |
|
771 | 768 |
|
772 | 769 |
if ((currentControl as IPath).PathData.Bounds.Left < minX) minX = (currentControl as IPath).PathData.Bounds.Left; |
773 | 770 |
if ((currentControl as IPath).PathData.Bounds.Top < minY) minY = (currentControl as IPath).PathData.Bounds.Top; |
... | ... | |
1450 | 1447 |
if (_ActualAngle > 360) _ActualAngle -= 360; |
1451 | 1448 |
if (_ActualAngle < 0) _ActualAngle += 360; |
1452 | 1449 |
#region AxisLock이 설정되어 있는 경우 Angle을 특정 값으로 정렬한다. |
1453 |
if (ViewerDataModel.Instance.IsAxisLock) |
|
1450 |
if (ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift)
|
|
1454 | 1451 |
{ |
1455 | 1452 |
double tmp = AlignedAngles.OrderBy(x => Math.Abs(_ActualAngle - x)).First(); |
1456 | 1453 |
dDeltaAngle = tmp - AngleValue; |
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
498 | 498 |
} |
499 | 499 |
#endregion |
500 | 500 |
|
501 |
public UndoDataGroup UndoData { get; set; } |
|
501 |
public UndoDataGroup UndoDataGroup { 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_UndoData multi_UndoData = new Multi_UndoData();
|
|
547 |
UndoData = new UndoDataGroup() |
|
546 |
UndoData multi_UndoData = new UndoData();
|
|
547 |
UndoDataGroup = new UndoDataGroup()
|
|
548 | 548 |
{ |
549 | 549 |
IsUndo = false, |
550 | 550 |
Event = EventType.Create, |
551 | 551 |
EventTime = DateTime.Now, |
552 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
552 |
MarkupDataColl = new List<UndoData>() |
|
553 | 553 |
}; |
554 | 554 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
555 | 555 |
{ |
... | ... | |
572 | 572 |
|
573 | 573 |
multi_UndoData = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
574 | 574 |
|
575 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
|
576 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
575 |
UndoDataGroup.MarkupDataColl.Add(multi_UndoData);
|
|
576 |
ViewerDataModel.Instance.UndoDataList.Add(UndoDataGroup);
|
|
577 | 577 |
} |
578 | 578 |
} |
579 | 579 |
|
... | ... | |
686 | 686 |
currentControl.EndPoint, |
687 | 687 |
currentControl.TopRightPoint, |
688 | 688 |
}; |
689 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
690 |
UndoData = new UndoDataGroup() |
|
689 |
UndoData multi_UndoData = new UndoData();
|
|
690 |
UndoDataGroup = new UndoDataGroup()
|
|
691 | 691 |
{ |
692 | 692 |
IsUndo = false, |
693 | 693 |
Event = EventType.Create, |
694 | 694 |
EventTime = DateTime.Now, |
695 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
695 |
MarkupDataColl = new List<UndoData>() |
|
696 | 696 |
}; |
697 | 697 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
698 | 698 |
{ |
... | ... | |
701 | 701 |
|
702 | 702 |
//multi_UndoData = dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
703 | 703 |
multi_UndoData = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo); |
704 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
|
705 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
704 |
UndoDataGroup.MarkupDataColl.Add(multi_UndoData);
|
|
705 |
ViewerDataModel.Instance.UndoDataList.Add(UndoDataGroup);
|
|
706 | 706 |
|
707 | 707 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo); |
708 | 708 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
735 | 735 |
} |
736 | 736 |
} |
737 | 737 |
|
738 |
public Multi_UndoData multi_UndoData;
|
|
738 |
public UndoData multi_UndoData; |
|
739 | 739 |
private void ApplyDragSelectionRect() |
740 | 740 |
{ |
741 |
multi_UndoData = new Multi_UndoData();
|
|
741 |
multi_UndoData = new UndoData(); |
|
742 | 742 |
|
743 |
UndoData = new UndoDataGroup() |
|
743 |
UndoDataGroup = new UndoDataGroup()
|
|
744 | 744 |
{ |
745 | 745 |
IsUndo = false, |
746 | 746 |
Event = EventType.Operation, |
747 | 747 |
EventTime = DateTime.Now, |
748 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
748 |
MarkupDataColl = new List<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.MarkupDataColl.Add(multi_UndoData); |
|
779 |
multi_UndoData = new Multi_UndoData();
|
|
778 |
UndoDataGroup.MarkupDataColl.Add(multi_UndoData);
|
|
779 |
multi_UndoData = new UndoData(); |
|
780 | 780 |
if (item.GroupID > 0) |
781 | 781 |
{ |
782 | 782 |
|
... | ... | |
789 | 789 |
{ |
790 | 790 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
791 | 791 |
}); |
792 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
792 |
ViewerDataModel.Instance.UndoDataList.Add(UndoDataGroup);
|
|
793 | 793 |
|
794 | 794 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
795 | 795 |
this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Add(final); |
KCOM/Events/CreateCommand.cs | ||
---|---|---|
68 | 68 |
IsUndo = false, |
69 | 69 |
Event = EventType.Create, |
70 | 70 |
EventTime = DateTime.Now, |
71 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
71 |
MarkupDataColl = new List<UndoData>() |
|
72 | 72 |
}; |
73 | 73 |
|
74 |
Multi_UndoData multi_UndoData = new Multi_UndoData()
|
|
74 |
UndoData multi_UndoData = new UndoData()
|
|
75 | 75 |
{ |
76 | 76 |
Markup = control |
77 | 77 |
}; |
KCOM/Events/CutCommand.cs | ||
---|---|---|
70 | 70 |
IsUndo = false, |
71 | 71 |
Event = EventType.Delete, |
72 | 72 |
EventTime = DateTime.Now, |
73 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
73 |
MarkupDataColl = new List<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_UndoData multi_UndoData = new Multi_UndoData()
|
|
80 |
UndoData multi_UndoData = new UndoData()
|
|
81 | 81 |
{ |
82 | 82 |
Markup = comment |
83 | 83 |
}; |
KCOM/Events/DeleteCommand.cs | ||
---|---|---|
61 | 61 |
IsUndo = false, |
62 | 62 |
Event = EventType.Delete, |
63 | 63 |
EventTime = DateTime.Now, |
64 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
64 |
MarkupDataColl = new List<UndoData>() |
|
65 | 65 |
}; |
66 | 66 |
|
67 | 67 |
foreach (var comment in comments) |
68 | 68 |
{ |
69 |
Multi_UndoData multi_UndoData = new Multi_UndoData()
|
|
69 |
UndoData multi_UndoData = new UndoData()
|
|
70 | 70 |
{ |
71 | 71 |
Markup = comment |
72 | 72 |
}; |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
27 | 27 |
using System.Threading.Tasks; |
28 | 28 |
using System.Windows.Threading; |
29 | 29 |
using System.Text.RegularExpressions; |
30 |
using MarkupToPDF.Controls.Shape; |
|
31 |
using MarkupToPDF.Controls.Polygon; |
|
32 |
using MarkupToPDF.Controls.Line; |
|
30 | 33 |
|
31 | 34 |
namespace KCOM.Views |
32 | 35 |
{ |
... | ... | |
115 | 118 |
Event = EventType.Operation, |
116 | 119 |
EventTime = DateTime.Now, |
117 | 120 |
paint = ViewerDataModel.Instance.paintSet, |
118 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
121 |
MarkupDataColl = new List<UndoData>() |
|
119 | 122 |
}; |
120 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
123 |
UndoData multi_UndoData = new UndoData();
|
|
121 | 124 |
|
122 | 125 |
foreach (AdornerMember InnerItem in AdonerList) |
123 | 126 |
{ |
... | ... | |
130 | 133 |
|
131 | 134 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
132 | 135 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
133 |
multi_UndoData = new Multi_UndoData();
|
|
136 |
multi_UndoData = new UndoData(); |
|
134 | 137 |
} |
135 | 138 |
|
136 | 139 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
808 | 811 |
Event = EventType.Operation, |
809 | 812 |
EventTime = DateTime.Now, |
810 | 813 |
Opacity = ViewerDataModel.Instance.ControlOpacity, |
811 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
814 |
MarkupDataColl = new List<UndoData>() |
|
812 | 815 |
}; |
813 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
816 |
UndoData multi_UndoData = new UndoData();
|
|
814 | 817 |
|
815 | 818 |
foreach (AdornerMember InnerItem in AdonerList) |
816 | 819 |
{ |
... | ... | |
818 | 821 |
|
819 | 822 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
820 | 823 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
821 |
multi_UndoData = new Multi_UndoData();
|
|
824 |
multi_UndoData = new UndoData(); |
|
822 | 825 |
} |
823 | 826 |
|
824 | 827 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
845 | 848 |
Event = EventType.Operation, |
846 | 849 |
EventTime = DateTime.Now, |
847 | 850 |
LineSize = ViewerDataModel.Instance.LineSize, |
848 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
851 |
MarkupDataColl = new List<UndoData>() |
|
849 | 852 |
}; |
850 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
853 |
UndoData multi_UndoData = new UndoData();
|
|
851 | 854 |
|
852 | 855 |
foreach (AdornerMember InnerItem in AdonerList) |
853 | 856 |
{ |
... | ... | |
939 | 942 |
|
940 | 943 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
941 | 944 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
942 |
multi_UndoData = new Multi_UndoData();
|
|
945 |
multi_UndoData = new UndoData(); |
|
943 | 946 |
} |
944 | 947 |
|
945 | 948 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
971 | 974 |
Event = EventType.Operation, |
972 | 975 |
EventTime = DateTime.Now, |
973 | 976 |
Interval = ViewerDataModel.Instance.Interval, |
974 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
977 |
MarkupDataColl = new List<UndoData>() |
|
975 | 978 |
}; |
976 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
979 |
UndoData multi_UndoData = new UndoData();
|
|
977 | 980 |
|
978 | 981 |
foreach (AdornerMember InnerItem in AdonerList) |
979 | 982 |
{ |
... | ... | |
985 | 988 |
|
986 | 989 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
987 | 990 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
988 |
multi_UndoData = new Multi_UndoData();
|
|
991 |
multi_UndoData = new UndoData(); |
|
989 | 992 |
} |
990 | 993 |
break; |
991 | 994 |
} |
... | ... | |
1001 | 1004 |
Properties.Settings.Default.Save(); |
1002 | 1005 |
} |
1003 | 1006 |
|
1007 |
/// <summary> |
|
1008 |
/// ArcLength가 수정되었을때 |
|
1009 |
/// </summary> |
|
1010 |
/// <param name="sender"></param> |
|
1011 |
/// <param name="e"></param> |
|
1004 | 1012 |
private void cbArcLength_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e) |
1005 | 1013 |
{ |
1006 | 1014 |
if (string.IsNullOrEmpty(cbArcLength.Value.ToString())) |
1007 | 1015 |
{ |
1008 | 1016 |
cbArcLength.Value = cbArcLength.Minimum; |
1009 | 1017 |
} |
1018 |
|
|
1010 | 1019 |
List<AdornerMember> AdonerList = GetAdornerItem(); |
1011 | 1020 |
if (AdonerList.Count > 0) |
1012 | 1021 |
{ |
1013 |
|
|
1014 |
//UndoData UndoData = new UndoData() |
|
1015 |
//{ |
|
1016 |
// IsUndo = false, |
|
1017 |
// Event = EventType.Option, |
|
1018 |
// EventTime = DateTime.Now, |
|
1019 |
// Interval = ViewerDataModel.Instance.Interval, |
|
1020 |
// MarkupDataColl = new List<Multi_UndoData>() |
|
1021 |
//}; |
|
1022 |
Multi_UndoData multi_UndoData = new Multi_UndoData(); |
|
1022 |
var comments = (from drawing in AdonerList |
|
1023 |
select drawing.DrawingData as CommentUserInfo) |
|
1024 |
.Where(x => x is RectCloudControl || x is CloudControl || |
|
1025 |
x is MarkupToPDF.Controls.Text.TextControl || x is MarkupToPDF.Controls.Text.ArrowTextControl) |
|
1026 |
.ToList(); |
|
1027 |
UndoCommand.Instance.Push(comments); |
|
1023 | 1028 |
|
1024 | 1029 |
foreach (AdornerMember InnerItem in AdonerList) |
1025 | 1030 |
{ |
... | ... | |
1027 | 1032 |
{ |
1028 | 1033 |
case ("RectCloudControl"): |
1029 | 1034 |
{ |
1030 |
(InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectCloudControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
|
1031 |
|
|
1032 |
//multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
1033 |
//UndoData.MarkupDataColl.Add(multi_UndoData); |
|
1034 |
//multi_UndoData = new Multi_UndoData(); |
|
1035 |
var item = InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectCloudControl; |
|
1036 |
item.ArcLength = ViewerDataModel.Instance.ArcLength; |
|
1035 | 1037 |
} |
1036 |
break;
|
|
1038 |
break; |
|
1037 | 1039 |
case ("CloudControl"): |
1038 |
{ |
|
1039 |
(InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.CloudControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
|
1040 |
|
|
1041 |
//multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
1042 |
//UndoData.MarkupDataColl.Add(multi_UndoData); |
|
1043 |
//multi_UndoData = new Multi_UndoData(); |
|
1044 |
} |
|
1045 |
break; |
|
1040 |
{ |
|
1041 |
var item = InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.CloudControl; |
|
1042 |
item.ArcLength = ViewerDataModel.Instance.ArcLength; |
|
1043 |
} |
|
1044 |
break; |
|
1045 |
case ("TextControl"): |
|
1046 |
{ |
|
1047 |
var item = InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl; |
|
1048 |
item.ArcLength = ViewerDataModel.Instance.ArcLength; |
|
1049 |
} |
|
1050 |
break; |
|
1051 |
case ("ArrowTextControl"): |
|
1052 |
{ |
|
1053 |
var item = InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl; |
|
1054 |
item.ArcLength = ViewerDataModel.Instance.ArcLength; |
|
1055 |
} |
|
1056 |
break; |
|
1046 | 1057 |
} |
1047 | 1058 |
} |
1048 |
|
|
1049 |
//ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
1050 |
//{ |
|
1051 |
// ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
1052 |
//}); |
|
1053 |
//ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
1054 | 1059 |
} |
1055 | 1060 |
|
1056 | 1061 |
KCOM.Properties.Settings.Default.ArcLength = (double)cbArcLength.Value; |
... | ... | |
1072 | 1077 |
Event = EventType.Operation, |
1073 | 1078 |
EventTime = DateTime.Now, |
1074 | 1079 |
DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData, |
1075 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
1080 |
MarkupDataColl = new List<UndoData>() |
|
1076 | 1081 |
}; |
1077 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
1082 |
UndoData multi_UndoData = new UndoData();
|
|
1078 | 1083 |
|
1079 | 1084 |
foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children) |
1080 | 1085 |
{ |
... | ... | |
1158 | 1163 |
|
1159 | 1164 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
1160 | 1165 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
1161 |
multi_UndoData = new Multi_UndoData();
|
|
1166 |
multi_UndoData = new UndoData(); |
|
1162 | 1167 |
} |
1163 | 1168 |
|
1164 | 1169 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
... | ... | |
2842 | 2847 |
|
2843 | 2848 |
} |
2844 | 2849 |
|
2845 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
2850 |
UndoData multi_UndoData = new UndoData();
|
|
2846 | 2851 |
CommentUserInfo currentControl { get; set; } |
2847 | 2852 |
private void Check_Closed(object sender, EventArgs e) |
2848 | 2853 |
{ |
... | ... | |
3162 | 3167 |
|
3163 | 3168 |
SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu); |
3164 | 3169 |
|
3165 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
3170 |
UndoData multi_UndoData = new UndoData();
|
|
3166 | 3171 |
|
3167 | 3172 |
//강인구 Undo/Redo 보류 |
3168 | 3173 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup() |
... | ... | |
3170 | 3175 |
IsUndo = false, |
3171 | 3176 |
Event = EventType.Create, |
3172 | 3177 |
EventTime = DateTime.Now, |
3173 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
3178 |
MarkupDataColl = new List<UndoData>() |
|
3174 | 3179 |
}; |
3175 | 3180 |
|
3176 | 3181 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
... | ... | |
3222 | 3227 |
{ |
3223 | 3228 |
try |
3224 | 3229 |
{ |
3225 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
3230 |
UndoData multi_UndoData = new UndoData();
|
|
3226 | 3231 |
|
3227 | 3232 |
//강인구 Undo/Redo 보류 |
3228 | 3233 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup() |
... | ... | |
3230 | 3235 |
IsUndo = false, |
3231 | 3236 |
Event = EventType.Create, |
3232 | 3237 |
EventTime = DateTime.Now, |
3233 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
3238 |
MarkupDataColl = new List<UndoData>() |
|
3234 | 3239 |
}; |
3235 | 3240 |
|
3236 | 3241 |
|
KCOM/Events/PasteCommand.cs | ||
---|---|---|
68 | 68 |
{ |
69 | 69 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
70 | 70 |
|
71 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
71 |
UndoData multi_UndoData = new UndoData();
|
|
72 | 72 |
|
73 | 73 |
//강인구 Undo/Redo 보류 |
74 | 74 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup() |
... | ... | |
76 | 76 |
IsUndo = false, |
77 | 77 |
Event = EventType.Create, |
78 | 78 |
EventTime = DateTime.Now, |
79 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
79 |
MarkupDataColl = new List<UndoData>() |
|
80 | 80 |
}; |
81 | 81 |
|
82 | 82 |
foreach (string parse in data) |
... | ... | |
127 | 127 |
{ |
128 | 128 |
try |
129 | 129 |
{ |
130 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
130 |
UndoData multi_UndoData = new UndoData();
|
|
131 | 131 |
|
132 | 132 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup() |
133 | 133 |
{ |
134 | 134 |
IsUndo = false, |
135 | 135 |
Event = EventType.Create, |
136 | 136 |
EventTime = DateTime.Now, |
137 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
137 |
MarkupDataColl = new List<UndoData>() |
|
138 | 138 |
}; |
139 | 139 |
|
140 | 140 |
string temppath = System.IO.Path.GetTempPath(); |
... | ... | |
246 | 246 |
|
247 | 247 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
248 | 248 |
|
249 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
249 |
UndoData multi_UndoData = new UndoData();
|
|
250 | 250 |
|
251 | 251 |
//강인구 Undo/Redo 보류 |
252 | 252 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup() |
... | ... | |
254 | 254 |
IsUndo = false, |
255 | 255 |
Event = EventType.Create, |
256 | 256 |
EventTime = DateTime.Now, |
257 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
257 |
MarkupDataColl = new List<UndoData>() |
|
258 | 258 |
}; |
259 | 259 |
|
260 | 260 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
... | ... | |
309 | 309 |
{ |
310 | 310 |
try |
311 | 311 |
{ |
312 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
312 |
UndoData multi_UndoData = new UndoData();
|
|
313 | 313 |
|
314 | 314 |
MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup() |
315 | 315 |
{ |
316 | 316 |
IsUndo = false, |
317 | 317 |
Event = EventType.Create, |
318 | 318 |
EventTime = DateTime.Now, |
319 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
319 |
MarkupDataColl = new List<UndoData>() |
|
320 | 320 |
}; |
321 | 321 |
|
322 | 322 |
string temppath = System.IO.Path.GetTempPath(); |
KCOM/Events/UndoCommand.cs | ||
---|---|---|
112 | 112 |
IsUndo = false, |
113 | 113 |
Event = EventType.Operation, |
114 | 114 |
EventTime = DateTime.Now, |
115 |
MarkupDataColl = new List<Multi_UndoData>(),
|
|
115 |
MarkupDataColl = new List<UndoData>(), |
|
116 | 116 |
}; |
117 | 117 |
|
118 | 118 |
foreach (var comment in comments) |
119 | 119 |
{ |
120 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
120 |
UndoData multi_UndoData = new UndoData();
|
|
121 | 121 |
multi_UndoData.Markup = comment; |
122 | 122 |
multi_UndoData.Clone = comment.Clone(); |
123 | 123 |
/* |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
151 | 151 |
public string Filename_ { get; set; } |
152 | 152 |
public double L_Size = 0; |
153 | 153 |
public AdornerFinal adorner_; |
154 |
public Multi_UndoData multi_UndoData;
|
|
154 |
public UndoData multi_UndoData; |
|
155 | 155 |
public string Symbol_ID = ""; |
156 | 156 |
|
157 | 157 |
/// <summary> |
... | ... | |
2775 | 2775 |
currentControl.EndPoint, |
2776 | 2776 |
currentControl.TopRightPoint, |
2777 | 2777 |
}; |
2778 |
Multi_UndoData multi_UndoData = new Multi_UndoData();
|
|
2778 |
UndoData multi_UndoData = new UndoData();
|
|
2779 | 2779 |
UndoDataGroup = new UndoDataGroup() |
2780 | 2780 |
{ |
2781 | 2781 |
IsUndo = false, |
2782 | 2782 |
Event = EventType.Create, |
2783 | 2783 |
EventTime = DateTime.Now, |
2784 |
MarkupDataColl = new List<Multi_UndoData>()
|
|
2784 |
MarkupDataColl = new List<UndoData>() |
|
2785 | 2785 |
}; |
2786 | 2786 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
2787 | 2787 |
{ |
... | ... | |
3066 | 3066 |
ViewerDataModel.Instance.checkHighlight = TextCtrl.IsHighLight; |
3067 | 3067 |
ViewerDataModel.Instance.ArcLength = TextCtrl.ArcLength; |
3068 | 3068 |
} |
3069 |
else if ((control as ArrowTextControl) != null)
|
|
3069 |
else if (control is ArrowTextControl ArrowTextCtrl)
|
|
3070 | 3070 |
{ |
3071 | 3071 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.SetFont((control as ArrowTextControl).TextFamily); |
3072 | 3072 |
|
3073 | 3073 |
if (!((control as ArrowTextControl).EnableEditing)) |
3074 | 3074 |
{ |
3075 |
(control as ArrowTextControl).EnableEditing = true;
|
|
3075 |
ArrowTextCtrl.EnableEditing = true;
|
|
3076 | 3076 |
} |
3077 | 3077 |
if ((control as ArrowTextControl).TextStyle == FontStyles.Italic) |
3078 | 3078 |
{ |
... | ... | |
3098 | 3098 |
{ |
3099 | 3099 |
ViewerDataModel.Instance.checkUnderLine = false; |
3100 | 3100 |
} |
3101 |
ViewerDataModel.Instance.checkHighlight = (control as ArrowTextControl).isHighLight; |
|
3102 |
ViewerDataModel.Instance.TextSize = (control as ArrowTextControl).TextSize; |
|
3101 |
ViewerDataModel.Instance.checkHighlight = ArrowTextCtrl.isHighLight; |
|
3102 |
ViewerDataModel.Instance.TextSize = ArrowTextCtrl.TextSize; |
|
3103 |
ViewerDataModel.Instance.ArcLength = ArrowTextCtrl.ArcLength; |
|
3103 | 3104 |
} |
3104 | 3105 |
else if (control is RectCloudControl RectCloudCtrl) |
3105 | 3106 |
{ |
... | ... | |
6140 | 6141 |
|
6141 | 6142 |
#endregion 캡쳐 기능 |
6142 | 6143 |
|
6143 |
public Multi_UndoData Control_Style(CommentUserInfo control)
|
|
6144 |
public UndoData Control_Style(CommentUserInfo control) |
|
6144 | 6145 |
{ |
6145 |
multi_UndoData = new Multi_UndoData();
|
|
6146 |
multi_UndoData = new UndoData(); |
|
6146 | 6147 |
|
6147 | 6148 |
multi_UndoData.Markup = control; |
6148 | 6149 |
|
MarkupToPDF/Common/Undo_data.cs | ||
---|---|---|
8 | 8 |
|
9 | 9 |
namespace MarkupToPDF.Common |
10 | 10 |
{ |
11 |
public class Multi_UndoData
|
|
11 |
public class UndoData |
|
12 | 12 |
{ |
13 | 13 |
public CommentUserInfo Markup { get; set; } |
14 | 14 |
public CommentUserInfo Clone { get; set; } |
... | ... | |
23 | 23 |
public class UndoDataGroup |
24 | 24 |
{ |
25 | 25 |
public EventType Event { get; set; } |
26 |
public List<Multi_UndoData> MarkupDataColl { get; set; }
|
|
26 |
public List<UndoData> MarkupDataColl { get; set; } = new List<UndoData>();
|
|
27 | 27 |
public bool IsUndo { get; set; } |
28 | 28 |
public DateTime EventTime { get; set; } |
29 | 29 |
public double LineSize { get; set; } |
MarkupToPDF/Controls/Etc/DateControl.cs | ||
---|---|---|
43 | 43 |
|
44 | 44 |
public override void Copy(CommentUserInfo lhs) |
45 | 45 |
{ |
46 |
if(lhs is DateControl dateControl)
|
|
46 |
if(lhs is DateControl item)
|
|
47 | 47 |
{ |
48 |
this.CommentAngle = dateControl.CommentAngle;
|
|
49 |
this.StartPoint = new Point(dateControl.StartPoint.X, dateControl.StartPoint.Y);
|
|
50 |
this.EndPoint = new Point(dateControl.EndPoint.X, dateControl.EndPoint.Y);
|
|
51 |
this.LeftBottomPoint = new Point(dateControl.LeftBottomPoint.X, dateControl.LeftBottomPoint.Y);
|
|
52 |
this.TopRightPoint = new Point(dateControl.TopRightPoint.X, dateControl.TopRightPoint.Y);
|
|
53 |
this.Opacity = dateControl.Opacity;
|
|
54 |
this.FontColor = dateControl.FontColor;
|
|
55 |
this.LineSize = dateControl.LineSize;
|
|
56 |
this.Text = dateControl.Text;
|
|
57 |
this.PointSet = dateControl.PointSet.ConvertAll(x => new Point(x.X, x.Y));
|
|
58 |
this.UserID = dateControl.UserID;
|
|
59 |
this.Memo = dateControl.Memo;
|
|
48 |
CommentAngle = item.CommentAngle;
|
|
49 |
StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y);
|
|
50 |
EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y);
|
|
51 |
LeftBottomPoint = new Point(item.LeftBottomPoint.X, item.LeftBottomPoint.Y);
|
|
52 |
TopRightPoint = new Point(item.TopRightPoint.X, item.TopRightPoint.Y);
|
|
53 |
Opacity = item.Opacity;
|
|
54 |
FontColor = item.FontColor;
|
|
55 |
LineSize = item.LineSize;
|
|
56 |
Text = item.Text;
|
|
57 |
PointSet = item.PointSet.ConvertAll(x => new Point(x.X, x.Y));
|
|
58 |
UserID = item.UserID;
|
|
59 |
Memo = item.Memo;
|
|
60 | 60 |
} |
61 | 61 |
} |
62 | 62 |
|
MarkupToPDF/Controls/Shape/RectCloudControl.cs | ||
---|---|---|
20 | 20 |
|
21 | 21 |
namespace MarkupToPDF.Controls.Shape |
22 | 22 |
{ |
23 |
public class RectCloudControl : CommentUserInfo, IDisposable, IPath, INotifyPropertyChanged, IMarkupCommonData, IShapeControl, IDashControl
|
|
23 |
public class RectCloudControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IShapeControl, IDashControl
|
|
24 | 24 |
{ |
25 | 25 |
#region 초기 선언 |
26 | 26 |
private const string PART_ArcPath = "PART_ArcPath"; |
MarkupToPDF/Controls/Text/ArrowTextControl.cs | ||
---|---|---|
17 | 17 |
|
18 | 18 |
namespace MarkupToPDF.Controls.Text |
19 | 19 |
{ |
20 |
public class ArrowTextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IPath, ITextControl, IMarkupControlData,ICommentRect
|
|
20 |
public class ArrowTextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, ITextControl, IMarkupControlData,ICommentRect |
|
21 | 21 |
{ |
22 | 22 |
private const string PART_ArrowPath = "PART_ArrowPath"; |
23 | 23 |
private const string PART_TextBox = "PART_ArrowTextBox"; |
... | ... | |
71 | 71 |
this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y); |
72 | 72 |
this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y); |
73 | 73 |
this.StrokeColor = item.StrokeColor; |
74 |
this.ArcLength = item.ArcLength; |
|
74 | 75 |
//this.DashSize = s.DashSize; |
75 | 76 |
this.ArrowTextStyle = item.ArrowTextStyle; |
76 | 77 |
this.isHighLight = item.isHighLight; |
... | ... | |
373 | 374 |
} |
374 | 375 |
} |
375 | 376 |
|
377 |
public Double ArcLength |
|
378 |
{ |
|
379 |
get { return (Double)GetValue(ArcLengthProperty); } |
|
380 |
set |
|
381 |
{ |
|
382 |
if (this.ArcLength != value) |
|
383 |
{ |
|
384 |
SetValue(ArcLengthProperty, value); |
|
385 |
OnPropertyChanged("ArcLength"); |
|
386 |
} |
|
387 |
} |
|
388 |
} |
|
389 |
|
|
376 | 390 |
public PathGeometry SubPathData |
377 | 391 |
{ |
378 | 392 |
get { return (PathGeometry)GetValue(SubPathDataProperty); } |
... | ... | |
837 | 851 |
public static readonly DependencyProperty StrokeColorProperty = DependencyProperty.Register( |
838 | 852 |
"StrokeColor", typeof(SolidColorBrush), typeof(ArrowTextControl), new PropertyMetadata(new SolidColorBrush(Colors.Red))); |
839 | 853 |
|
854 |
public static readonly DependencyProperty ArcLengthProperty = DependencyProperty.Register( |
|
855 |
"ArcLength", typeof(double), typeof(ArrowTextControl), new PropertyMetadata((Double)10, PointValueChanged)); |
|
856 |
|
|
840 | 857 |
public static readonly DependencyProperty ControlTypeProperty = DependencyProperty.Register( |
841 | 858 |
"ControlType", typeof(ControlType), typeof(ArrowTextControl), new FrameworkPropertyMetadata(ControlType.ArrowTextControl)); |
842 | 859 |
|
... | ... | |
1483 | 1500 |
new Point(Canvas.GetLeft(Base_TextBox) - BoxWidth, Canvas.GetTop(Base_TextBox)), |
1484 | 1501 |
new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)), //위 |
1485 | 1502 |
}; |
1486 |
SubPathData = (Generate(pCloud));
|
|
1503 |
SubPathData = Generate(pCloud, this.ArcLength);
|
|
1487 | 1504 |
PathDataInner = (GenerateInnerCloud(pCloud, angle)); |
1488 | 1505 |
|
1489 | 1506 |
}//20180906 LJY Textbox guide |
... | ... | |
1517 | 1534 |
#endif |
1518 | 1535 |
}; |
1519 | 1536 |
//instanceGroup.Children.Add(Generate(pCloud)); |
1520 |
SubPathData = (Generate(pCloud));
|
|
1537 |
SubPathData = Generate(pCloud, this.ArcLength);
|
|
1521 | 1538 |
PathDataInner = (GenerateInnerCloud(pCloud, angle)); |
1522 | 1539 |
// } |
1523 | 1540 |
} |
... | ... | |
1653 | 1670 |
return pathFigure; |
1654 | 1671 |
} |
1655 | 1672 |
|
1656 |
public static PathGeometry Generate(List<Point> pData) |
|
1673 |
public static PathGeometry Generate(List<Point> pData, double _ArcLength)
|
|
1657 | 1674 |
{ |
1658 | 1675 |
var _pathGeometry = new PathGeometry(); |
1659 | 1676 |
|
... | ... | |
1662 | 1679 |
int count = pData.Count; |
1663 | 1680 |
for (int i = 0; i < (count - 1); i++) |
1664 | 1681 |
{ |
1665 |
PathFigure pathFigure = Polygon.CloudControl.GenerateLineWithCloud(pData[i], pData[i + 1], 20, reverse);
|
|
1682 |
PathFigure pathFigure = Polygon.CloudControl.GenerateLineWithCloud(pData[i], pData[i + 1], _ArcLength, reverse);
|
|
1666 | 1683 |
pathFigure.IsClosed = false; |
1667 | 1684 |
pathFigure.IsFilled = false; |
1668 | 1685 |
_pathGeometry.Figures.Add(pathFigure); |
... | ... | |
1824 | 1841 |
selected.Y += dy; |
1825 | 1842 |
} |
1826 | 1843 |
|
1827 |
int i = 0; |
|
1844 |
int i = 0;
|
|
1828 | 1845 |
for (i = 0; i < (this as IPath).PointSet.Count; i++) |
1829 | 1846 |
{ |
1830 | 1847 |
if (pt.Equals((this as IPath).PointSet[i])) break; |
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
17 | 17 |
|
18 | 18 |
namespace MarkupToPDF.Controls.Text |
19 | 19 |
{ |
20 |
public class TextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IPath, ITextControl, IMarkupControlData
|
|
20 |
public class TextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, ITextControl, IMarkupControlData |
|
21 | 21 |
{ |
22 | 22 |
public event PropertyChangedEventHandler PropertyChanged; |
23 | 23 |
|
... | ... | |
91 | 91 |
LineSize = item.LineSize; |
92 | 92 |
TextSize = item.TextSize; |
93 | 93 |
StrokeColor = item.StrokeColor; |
94 |
ArcLength = item.ArcLength; |
|
94 | 95 |
FontSize = item.FontSize; |
95 | 96 |
UserID = item.UserID; |
96 | 97 |
IsHighLight = item.IsHighLight; |
... | ... | |
726 | 727 |
} |
727 | 728 |
} |
728 | 729 |
|
729 |
|
|
730 |
|
|
731 | 730 |
public Double TextSize |
732 | 731 |
{ |
733 | 732 |
get { return (Double)GetValue(TextSizeProperty); } |
... | ... | |
1208 | 1207 |
|
1209 | 1208 |
Point length = new Point(); |
1210 | 1209 |
double angle = this.CommentAngle * Math.PI / 180; |
1210 |
double sin = Math.Sin(angle); |
|
1211 |
double cos = Math.Cos(angle); |
|
1211 | 1212 |
|
1212 |
length.X = this.BoxWidth * Math.Cos(angle) - this.BoxHeight * Math.Sin(angle);
|
|
1213 |
length.Y = this.BoxWidth * Math.Sin(angle) + this.BoxHeight * Math.Cos(angle);
|
|
1213 |
length.X = this.BoxWidth * cos - this.BoxHeight * sin;
|
|
1214 |
length.Y = this.BoxWidth * sin + this.BoxHeight * cos;
|
|
1214 | 1215 |
|
1215 | 1216 |
Point end = new Point(start.X + length.X, start.Y + length.Y); |
1216 | 1217 |
return new Rect(start, end); |
... | ... | |
1231 | 1232 |
|
1232 | 1233 |
this.SetValue(TextControl.CanvasXProperty, Canvas.GetLeft(this) + dx); |
1233 | 1234 |
this.SetValue(TextControl.CanvasYProperty, Canvas.GetTop(this) + dy); |
1234 |
|
|
1235 |
|
|
1236 |
|
|
1237 |
|
|
1238 |
//Canvas.SetLeft(this, Canvas.GetLeft(this) + dx); |
|
1239 |
//Canvas.SetTop(this, Canvas.GetTop(this) + dy); |
|
1240 | 1235 |
} |
1241 | 1236 |
|
1242 | 1237 |
/// <summary> |
내보내기 Unified diff