프로젝트

일반

사용자정보

개정판 8118ba81

ID8118ba81351339c1a83543c2f0e80ce909364b97
상위 e1b36bc0
하위 d1f35ad3

임예철이(가) 5달 전에 추가함

Dash Style 변경 시 Undo 추가
Group 관련 기능 시 Undo 추가

Change-Id: Idd9a674a676acaa0795511419bc949039f06b5fe

차이점 보기:

KCOM/Events/Event_KeyEvent.cs
1 1
using KCOM.Common;
2
using KCOM.Controls;
2 3
using KCOM.Events;
3 4
using MarkupToPDF.Common;
5
using MarkupToPDF.Controls.Cad;
6
using MarkupToPDF.Controls.Line;
4 7
using MarkupToPDF.Controls.Parsing;
8
using MarkupToPDF.Controls.Polygon;
9
using MarkupToPDF.Controls.Shape;
5 10
using MarkupToPDF.Controls.Text;
6 11
using System;
7 12
using System.Collections.Generic;
......
221 226
                        #region Grouping 해제
222 227
                        if (ViewerDataModel.Instance.IsPressCtrl && ViewerDataModel.Instance.IsPressShift)
223 228
                        {
229
                            if (ViewerDataModel.Instance.UndoDataList == null)
230
                            {
231
                                return;
232
                            }
233

  
234
                            UndoCommand.Instance.Push(EventType.Operation, SelectionSet.Instance.SelectedItems);
235

  
224 236
                            SelectionSet.Instance.SelectedItems.ForEach(x => x.GroupID = string.Empty);
225 237
                        }
226 238
                        #endregion
227 239
                        #region Grouping
228 240
                        else if (ViewerDataModel.Instance.IsPressCtrl)
229 241
                        {
242
                            if (ViewerDataModel.Instance.UndoDataList == null)
243
                            {
244
                                return;
245
                            }
246

  
247
                            UndoCommand.Instance.Push(EventType.Operation, SelectionSet.Instance.SelectedItems);
248

  
230 249
                            string GroupID = Guid.NewGuid().ToString();
231 250
                            SelectionSet.Instance.SelectedItems.ForEach(x => x.GroupID = GroupID);
232 251
                        }
KCOM/Events/Implementation/TopMenuEvent.cs
30 30
using MarkupToPDF.Controls.Shape;
31 31
using MarkupToPDF.Controls.Polygon;
32 32
using MarkupToPDF.Controls.Line;
33
using MarkupToPDF.Controls.Cad;
33 34

  
34 35
namespace KCOM.Views
35 36
{
......
915 916
                ViewerDataModel.Instance.DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
916 917
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
917 918
                {
918
                    UndoDataGroup UndoData = new UndoDataGroup()
919
                    //UndoDataGroup UndoData = new UndoDataGroup()
920
                    //{
921
                    //    IsUndo = false,
922
                    //    Event = EventType.Operation,
923
                    //    EventTime = DateTime.Now,
924
                    //    DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData,
925
                    //    MarkupDataColl = new List<UndoData>()
926
                    //};
927
                    //UndoData multi_UndoData = new UndoData();
928

  
929
                    if (ViewerDataModel.Instance.UndoDataList == null)
919 930
                    {
920
                        IsUndo = false,
921
                        Event = EventType.Operation,
922
                        EventTime = DateTime.Now,
923
                        DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData,
924
                        MarkupDataColl = new List<UndoData>()
925
                    };
926
                    UndoData multi_UndoData = new UndoData();
931
                        return;
932
                    }
933

  
934
                    List<AdornerMember> AdonerList = GetAdornerItem();
935

  
936
                    var comments = (from drawing in AdonerList
937
                                    select drawing.DrawingData as CommentUserInfo)
938
                        .Where(x => x is LineControl || x is ArcControl || x is ArrowArcControl || x is ArrowControl_Multi
939
                        || x is CloudControl || x is PolygonControl || x is PolygonControl || x is RectangleControl ||
940
                        x is RectCloudControl || x is TriControl || x is CircleControl || x is InsideWhiteControl ||
941
                        x is OverlapWhiteControl || x is ClipWhiteControl || x is CoordinateControl ||
942
                        x is MarkupToPDF.Controls.Text.TextControl || x is MarkupToPDF.Controls.Text.ArrowTextControl)
943
                        .ToList();
944

  
945
                    UndoCommand.Instance.Push(EventType.Operation, comments);
946

  
927 947

  
928 948
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
929 949
                    {
......
1005 1025
                                        break;
1006 1026
                                }
1007 1027

  
1008
                                multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
1009
                                UndoData.MarkupDataColl.Add(multi_UndoData);
1010
                                multi_UndoData = new UndoData();
1028
                                //multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
1029
                                //UndoData.MarkupDataColl.Add(multi_UndoData);
1030
                                //multi_UndoData = new UndoData();
1011 1031
                            }
1012 1032

  
1013
                            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
1014
                            {
1015
                                ViewerDataModel.Instance.UndoDataList.Remove(i);
1016
                            });
1017
                            ViewerDataModel.Instance.UndoDataList.Add(UndoData);
1033
                            //ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
1034
                            //{
1035
                            //    ViewerDataModel.Instance.UndoDataList.Remove(i);
1036
                            //});
1037
                            //ViewerDataModel.Instance.UndoDataList.Add(UndoData);
1038

  
1018 1039
                        }
1019 1040
                    }
1020 1041
                }

내보내기 Unified diff

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