프로젝트

일반

사용자정보

개정판 b79d6e7f

IDb79d6e7fe47779e89433864a593fe62b9d09de65
상위 219bb41d
하위 1af0f150

백흠경이(가) 9달 전에 추가함

Fix: ArrowTextControl, TextControl에 ArcLength 적용

Change-Id: I02e837c6e9e97fc48008ee3753012f8025414ffb

차이점 보기:

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

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)