프로젝트

일반

사용자정보

개정판 34ac8db7

ID34ac8db7f7b582586ee927d3fdae3df9b8f7e77f
상위 f0c9e80e
하위 85132173

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

Fix: Delete에 대한 Undo/Redo 기능 수정

Change-Id: I55592f4822b661ed7f61c714382bd8d988145ef7

차이점 보기:

KCOM/App.xaml.cs
412 412

  
413 413
#if DEBUG
414 414
                //sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
415
                System.Diagnostics.Debug.WriteLine("sBaseServiceURL");
415
                System.Diagnostics.Debug.WriteLine("BaseServiceURL");
416 416
                BaseAddress = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
417 417
#else
418 418
                BaseAddress = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
KCOM/Common/SelectionSet.cs
125 125
        {
126 126
            try
127 127
            {
128
                //Logger.sendCheckLog("pageNavigator_PageChanging_ReleaseAdorner", 1);
129 128
                if (mainMenu.SelectLayer.Children.Count > 0)
130 129
                {
131 130
                    foreach (var item in mainMenu.SelectLayer.Children)
......
149 148
                                    var control = InnerItem.DrawingData as CommentUserInfo;
150 149
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(control);
151 150

  
151
                                    #region Unselect하는데 Create 커맨드를 추가해야 하는지 이해되지 않음
152
                                    /*
152 153
                                    var vUndoBeforeTargetItem =
153 154
                                        ViewerDataModel.Instance.UndoDataList.ToList().OrderBy(x => x.EventTime).LastOrDefault();
154 155

  
......
158 159
                                    }
159 160
                                    else
160 161
                                    {
161
                                        MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
162
                                        MarkupToPDF.Common.UndoDataGroup UndoDataGroup = new UndoDataGroup()
162 163
                                        {
163 164
                                            IsUndo = false,
164 165
                                            Event = EventType.Create,
......
166 167
                                            MarkupDataColl = new List<UndoData>()
167 168
                                        };
168 169

  
169
                                        var multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control);
170
                                        UndoData.MarkupDataColl.Add(multi_UndoData);
171
                                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);
170
                                        var _UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(control);
171
                                        UndoDataGroup.MarkupDataColl.Add(_UndoData);
172
                                        ViewerDataModel.Instance.UndoDataList.Add(UndoDataGroup);
172 173
                                    }
173 174
                                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList();
175
                                    */
176
                                    #endregion
174 177
                                }
175 178
                            }
176 179
                        }
KCOM/Controls/AdornerFinal.xaml.cs
1194 1194

  
1195 1195
            var comments = (from drawing in this.Members
1196 1196
                            select drawing.DrawingData as CommentUserInfo).ToList();
1197
            //UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstPointTemp);
1198 1197
            ViewerDataModel.Instance.IsMarkupUpdate = true;
1199 1198
        }
1200 1199

  
......
1213 1212
                return;
1214 1213
            }
1215 1214

  
1216
            
1217
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb))
1218
            //{
1219
            //    return;
1220
            //}
1221

  
1222
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null))
1223
            //{
1224
            //    if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
1225
            //    {
1226
            //        if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
1227
            //        {
1228
            //            return;
1229
            //        }
1230
            //    }
1231
            //}
1232

  
1233 1215
            var comments = (from drawing in this.Members
1234 1216
                            select drawing.DrawingData as CommentUserInfo).ToList();
1235
            //UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstBeforePointSet);
1236
            UndoCommand.Instance.Push(comments);
1217

  
1218
            UndoCommand.Instance.Push(EventType.Operation, comments);
1237 1219
        }
1238 1220

  
1239 1221
        private void rotate_MouseMove(object sender, MouseEventArgs e)
......
1271 1253
            {
1272 1254
                return;
1273 1255
            }
1274
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb))
1275
            //{
1276
            //    return;
1277
            //}
1278
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null))
1279
            //{
1280
            //    if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
1281
            //    {
1282
            //        if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
1283
            //        {
1284
            //            return;
1285
            //        }
1286
            //    }
1287
            //}
1288 1256

  
1289 1257
            var comments = (from drawing in this.Members
1290 1258
                            select drawing.DrawingData as CommentUserInfo).ToList();
1291
            //UndoCommand.Instance.Push(comments, this.AngleValue);
1292
            UndoCommand.Instance.Push(comments);
1259

  
1260
            UndoCommand.Instance.Push(EventType.Operation, comments);
1293 1261
        }
1294 1262

  
1295 1263
        private void drag_DragCompleted(object sender, DragCompletedEventArgs e)
......
1298 1266

  
1299 1267
            var comments = (from drawing in this.Members
1300 1268
                            select drawing.DrawingData as CommentUserInfo).ToList();
1301
            //UndoCommand.Instance.Push(comments, this.AngleValue);
1302 1269
        }
1303 1270

  
1304 1271
        private void DragThumb_DragDelta(object sender, DragDeltaEventArgs e)
......
1319 1286

  
1320 1287
                var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect();
1321 1288

  
1322
                //if (ViewerDataModel.Instance.PageAngle == 270 || ViewerDataModel.Instance.PageAngle == 90)
1323
                //{
1324
                //    mainRect = new Rect(0, 0, mainRect.Height, mainRect.Width);
1325
                //}
1326

  
1327 1289
                mainRect = MathHelper.RotateRect(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect(), new Point(mainRect.Width / 2, mainRect.Height / 2), ViewerDataModel.Instance.PageAngle);
1328 1290

  
1329 1291
                var rect = (this.ContainerContent.FindChildByType<CommentUserInfo>() as CommentUserInfo).ItemRect; //this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel);
......
1333 1295
                var moveDirection = mainRect.Movement(rotationRect);
1334 1296

  
1335 1297
                System.Diagnostics.Debug.WriteLine($"horzChange: {horzChange} , vertChange:{vertChange}");
1336
                //System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : Top:{rect.Top}, Left:{rect.Left}, Right:{rect.Right}, Bottom:{rect.Bottom} ,BottomLeft : {rect.BottomLeft} BottomRight : {rect.BottomRight}");
1337

  
1338
                //if (Math.Abs(horzChange) > 0)
1339
                //{
1340
                //    if ((horzChange < 0 && !moveDirection.Left) || (horzChange > 0 && !moveDirection.Right))
1341
                //    {
1342
                //        //this.TranslateItems(horzChange * -1, 0);
1343
                //        //e.Handled = true;
1344
                //        horzChange = 0;
1345
                //        newMousePoint.X = this.CurrentMousePoint.X;
1346
                //    }
1347
                //}
1348

  
1349
                //if (Math.Abs(vertChange) > 0)
1350
                //{
1351
                //    if ((vertChange < 0 && !moveDirection.Up) || (vertChange > 0 && !moveDirection.Down))
1352
                //    {
1353
                //        //this.TranslateItems(0, vertChange * -1);
1354
                //        //e.Handled = true;
1355
                //        vertChange = 0;
1356
                //        newMousePoint.Y = this.CurrentMousePoint.Y;
1357
                //    }
1358
                //}
1359 1298

  
1360 1299
                this.TranslateItems(horzChange, vertChange);
1361 1300
            }
......
1538 1477
            }
1539 1478
            /// up to here
1540 1479

  
1541
            //dBeforeAngle = this.angleValue;
1542

  
1543 1480
            if (ViewerDataModel.Instance.UndoDataList == null)
1544 1481
            {
1545 1482
                return;
1546 1483
            }
1547 1484

  
1548
            //if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb)
1549
            //{
1550
            //    return;
1551
            //}
1552

  
1553
            //if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null)
1554
            //{
1555
            //    if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
1556
            //    {
1557
            //        if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
1558
            //        {
1559
            //            return;
1560
            //        }
1561
            //    }
1562
            //}
1563

  
1564 1485
            var comments = (from drawing in this.Members
1565 1486
                            select drawing.DrawingData as CommentUserInfo).ToList();
1566
            UndoCommand.Instance.Push(comments);
1487
            UndoCommand.Instance.Push(EventType.Operation, comments);
1567 1488
        }
1568 1489
        
1569 1490
        private void rotate_DragCompleted(object sender, DragCompletedEventArgs e)
......
1572 1493

  
1573 1494
            var comments = (from drawing in this.Members
1574 1495
                            select drawing.DrawingData as CommentUserInfo).ToList();
1575
            //UndoCommand.Instance.Push(comments, this.AngleValue, dBeforeAngle);
1576 1496
        }
1577 1497

  
1578 1498
        public void ControlPointMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
KCOM/Events/DeleteCommand.cs
1
using KCOM.Common;
2
using KCOM.Controls;
3
using KCOM.Views;
4
using MarkupToPDF.Common;
5
using MarkupToPDF.Controls.Parsing;
6
using Newtonsoft.Json;
7
using Newtonsoft.Json.Converters;
8
using Newtonsoft.Json.Linq;
9
using Newtonsoft.Json.Serialization;
10
using System;
11
using System.Collections;
12
using System.Collections.Generic;
13
using System.ComponentModel;
14
using System.Data;
15
using System.IO;
16
using System.Linq;
17
using System.Reflection;
18
using System.Runtime.Serialization.Formatters;
19
using System.Runtime.Serialization.Formatters.Binary;
20
using System.Runtime.Serialization.Json;
21
using System.Text;
22
using System.Windows;
23
using System.Windows.Media;
24
using System.Xml;
25
using System.Xml.Serialization;
26

  
27
namespace KCOM
28
{
29
    public class DeleteCommand
30
    {
31
        private static readonly DeleteCommand _instance = new DeleteCommand();
32

  
33
        // Explicit static constructor to tell C# compiler
34
        // not to mark type as beforefieldinit
35
        static DeleteCommand()
36
        {
37
        }
38

  
39
        private DeleteCommand()
40
        {
41
        }
42

  
43
        public static DeleteCommand Instance
44
        {
45
            get
46
            {
47
                return _instance;
48
            }
49
        }
50

  
51
        /// <summary>
52
        /// delete given comments
53
        /// </summary>
54
        /// <author>humkyung</author>
55
        /// <date>2019.06.12</date>
56
        /// <param name="comments"></param>
57
        public void Execute(ICollection<CommentUserInfo> comments)
58
        {
59
            MarkupToPDF.Common.UndoDataGroup UndoData = new UndoDataGroup()
60
            {
61
                IsUndo = false,
62
                Event = EventType.Delete,
63
                EventTime = DateTime.Now,
64
                MarkupDataColl = new List<UndoData>()
65
            };
66

  
67
            foreach (var comment in comments)
68
            {
69
                UndoData multi_UndoData = new UndoData()
70
                {
71
                    Markup = comment
72
                };
73
                UndoData.MarkupDataColl.Add(multi_UndoData);
74

  
75
                ViewerDataModel.Instance.MarkupControls_USER.Remove(comment);
76
                ViewerDataModel.Instance.MarkupControls.Remove(comment);
77

  
78
                var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == comment.CommentID).FirstOrDefault();
79
                ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
80

  
81
                ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
82
                null, EventType.Delete, MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID).CommentID, null);
83
            }
84

  
85
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
86
            {
87
                ViewerDataModel.Instance.UndoDataList.Remove(i);
88
            });
89
            ViewerDataModel.Instance.UndoDataList.Add(UndoData);            
90
        }
91
    }
92
}
KCOM/Events/Event_KeyEvent.cs
232 232
                case Key.Delete:
233 233
                    {
234 234
                        List<CommentUserInfo> selectItems = SelectionSet.Instance.SelectedItems;
235
                        SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
235
                        ///SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
236 236
                        this.dzMainMenu.SelectLayer.Children.Clear();
237 237

  
238
                        DeleteCommand.Instance.Execute(selectItems);
238
                        UndoCommand.Instance.Push(EventType.Delete, selectItems);
239 239
                    }
240 240
                    break;
241 241
                #endregion
KCOM/Events/Implementation/TopMenuEvent.cs
101 101
            if (adornerMembers.Count() > 0)
102 102
            {
103 103
                //UndoCommand.Instance.Push(adornerMembers.Select(x => x.DrawingData).Cast<CommentUserInfo>().ToList(), adnoerFinal.AngleValue);
104
                UndoCommand.Instance.Push(adornerMembers.Select(x => x.DrawingData).Cast<CommentUserInfo>().ToList());
104
                UndoCommand.Instance.Push(EventType.Operation, adornerMembers.Select(x => x.DrawingData).Cast<CommentUserInfo>().ToList());
105 105
            }
106 106
        }
107 107

  
......
1024 1024
                                .Where(x => x is RectCloudControl || x is CloudControl ||
1025 1025
                                x is MarkupToPDF.Controls.Text.TextControl || x is MarkupToPDF.Controls.Text.ArrowTextControl)
1026 1026
                                .ToList();
1027
                UndoCommand.Instance.Push(comments);
1027
                UndoCommand.Instance.Push(EventType.Operation, comments);
1028 1028

  
1029 1029
                foreach (AdornerMember InnerItem in AdonerList)
1030 1030
                {
......
2548 2548
                    #endregion
2549 2549
                    #region Delete
2550 2550
                    case "Delete":
2551
                        DeleteCommand.Instance.Execute(SelectionSet.Instance.SelectedItems);
2551
                        UndoCommand.Instance.Push(EventType.Delete, SelectionSet.Instance.SelectedItems);
2552 2552
                        this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Clear();
2553 2553

  
2554 2554
                        instanceToggle.IsChecked = false;
KCOM/Events/RedoCommand.cs
59 59
                        foreach (var item in redo.MarkupDataColl)
60 60
                        {
61 61
                            ViewerDataModel.Instance.MarkupControls_USER.Add(item.Markup);
62

  
62 63
                            ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
63 64
                            MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
64 65
                        }
......
69 70
                        foreach (var item in redo.MarkupDataColl)
70 71
                        {
71 72
                            ViewerDataModel.Instance.MarkupControls_USER.Remove(item.Markup);
73

  
72 74
                            ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
73 75
                            null, EventType.Delete, item.Markup.CommentID, null);
74 76
                        }
......
94 96
                        SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
95 97
                    }
96 98
                    break;
97
                    /*
98
                case (EventType.Select):
99
                    {
100
                        List<CommentUserInfo> comment = new List<CommentUserInfo>();
101

  
102
                        foreach (var item in redo.MarkupDataColl)
103
                        {
104
                            ViewerDataModel.Instance.MarkupControls_USER.Remove(item.Markup);
105

  
106
                            if ((item.Markup as IPath) != null)
107
                            {
108
                                (item.Markup as IPath).LineSize = item.LineSize;
109
                            }
110
                            if ((item.Markup as UIElement) != null)
111
                            {
112
                                (item.Markup as UIElement).Opacity = item.Opacity;
113
                            }
114
                            if ((item.Markup as IDashControl) != null)
115
                            {
116
                                (item.Markup as IDashControl).DashSize = item.DashSize;
117
                            }
118
                            if ((item.Markup as IShapeControl) != null)
119
                            {
120
                                (item.Markup as IShapeControl).Paint = item.paint;
121
                            }
122

  
123
                            comment.Add(item.Markup);
124
                        }
125
                        final = new AdornerFinal(comment);
126
                        Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
127
                    }
128
                    break;
129
                    */
130 99
            }
131 100

  
132 101
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == redo.EventTime).ToList()
KCOM/Events/SaveCommand.cs
83 83

  
84 84
                SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
85 85
                var mainmenu = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu;
86
                //var client = mainmenu.BaseClient;
87 86

  
88 87
                foreach (var UserState in UserStates)
89 88
                {
KCOM/Events/UndoCommand.cs
47 47
        /// <author>humkyung</author>
48 48
        /// <date>2019.06.14, 2024.04.26</date>
49 49
        /// <param name="comments"></param>
50
        public void Push(ICollection<CommentUserInfo> comments)
50
        public void Push(EventType _EventType, ICollection<CommentUserInfo> comments)
51 51
        {
52 52
            UndoDataGroup UndoData = new UndoDataGroup()
53 53
            {
54 54
                IsUndo = false,
55
                Event = EventType.Operation,
55
                Event = _EventType,
56 56
                EventTime = DateTime.Now,
57 57
                MarkupDataColl = new List<UndoData>(),
58 58
            };
59 59

  
60 60
            foreach (var comment in comments)
61 61
            {
62
                UndoData _UndoData = new UndoData();
63
                _UndoData.Markup = comment;
62
                UndoData _UndoData = new UndoData()
63
                {
64
                    Markup = comment
65
                };
64 66
                _UndoData.Clone = comment.Clone();
65

  
66 67
                UndoData.MarkupDataColl.Add(_UndoData);
67
                ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
68
                            MarkupParser.MarkupToString(_UndoData.Markup, App.ViewInfo.UserID), EventType.Operation, null, null);
68

  
69
                if (_EventType == EventType.Delete)
70
                {
71
                    ViewerDataModel.Instance.MarkupControls_USER.Remove(comment);
72
                    ViewerDataModel.Instance.MarkupControls.Remove(comment);
73

  
74
                    var Item_ = ViewerDataModel.Instance.MyMarkupList.Find(d => d.ID == comment.CommentID);
75
                    ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
76

  
77
                    ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
78
                        null, EventType.Delete, MarkupParser.MarkupToString(_UndoData.Markup, App.ViewInfo.UserID).CommentID, null);
79
                }
80
                else
81
                {
82
                    ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
83
                        MarkupParser.MarkupToString(_UndoData.Markup, App.ViewInfo.UserID), EventType.Operation, null, null);
84
                }
69 85
            }
70
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
86

  
87
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo).ToList().ForEach(i =>
71 88
            {
72 89
                ViewerDataModel.Instance.UndoDataList.Remove(i);
73 90
            });
74

  
75 91
            ViewerDataModel.Instance.UndoDataList.Add(UndoData);
76 92
        }
77 93

  
......
83 99
            AdornerFinal final;
84 100
            SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
85 101

  
86
            UndoDataGroup undo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == false).ToList()
102
            UndoDataGroup undo = ViewerDataModel.Instance.UndoDataList.Where(data => !data.IsUndo).ToList()
87 103
                .OrderByDescending(order => order.EventTime).FirstOrDefault();
88 104
            if (undo == null) return;
89 105

  
......
94 110
                        foreach (var item in undo.MarkupDataColl)
95 111
                        {
96 112
                            ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup));
113

  
97 114
                            ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
98 115
                            null, EventType.Delete, item.Markup.CommentID, null);
99 116
                        }
......
101 118
                    break;
102 119
                case (EventType.Delete):
103 120
                    {
121
                        List<CommentUserInfo> comment = new List<CommentUserInfo>();
104 122
                        foreach (var item in undo.MarkupDataColl)
105 123
                        {
106
                            //var markupitem = MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID);
107

  
108
                            //if (markupitem != null)
109
                            //{
110
                            //    IKCOM.MarkupItemEx markup = new IKCOM.MarkupItemEx
111
                            //    {
112
                            //        Data = markupitem.ConvertData,
113
                            //        Data_Type = markupitem.DATA_TYPE,
114
                            //        ID = markupitem.CommentID,
115
                            //        IsUpdate = false,
116
                            //        MarkupInfoID = App.Custom_ViewInfoId,
117
                            //        PageNumber = ViewerDataModel.Instance.PageNumber,
118
                            //        //Symbol_ID = p.Symbol_ID,
119
                            //        //Group_ID = p.Group_ID
120
                            //    };
121

  
122
                            //    ViewerDataModel.Instance.MyMarkupList.Add(markup);
123
                            //}
124

  
125
                            //ViewerDataModel.Instance.MarkupControls.Add(item.Markup);
124
                            ViewerDataModel.Instance.MarkupControls_USER.Add(item.Markup);
126 125
                            item.Markup.Load();
126
                            item.Markup.UpdateControl();
127
                            comment.Add(item.Markup);
127 128

  
128
                            ViewerDataModel.Instance.MarkupControls_USER.Add(item.Markup);
129
                            ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
130
                            MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
129
                            ///ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
130
                            ///MarkupParser.MarkupToString(item.Markup, App.ViewInfo.UserID), EventType.Create, null, null);
131 131
                        }
132

  
133
                        final = new AdornerFinal(comment);
134
                        Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
132 135
                    }
133 136
                    break;
134 137
                case (EventType.Operation):
......
148 151
                        }
149 152
                        final = new AdornerFinal(comment);
150 153
                        Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
151
                        SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
152
                    }
153
                    break;
154
                    /*
155
                case (EventType.Select):
156
                    {
157
                        List<CommentUserInfo> comment = new List<CommentUserInfo>();
158

  
159
                        foreach (var item in undo.MarkupDataColl)
160
                        {
161
                            ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup));
162

  
163
                            if ((item.Markup as IPath) != null)
164
                            {
165
                                (item.Markup as IPath).LineSize = item.LineSize;
166
                            }
167
                            if ((item.Markup as UIElement) != null)
168
                            {
169
                                (item.Markup as UIElement).Opacity = item.Opacity;
170
                            }
171
                            if ((item.Markup as IDashControl) != null)
172
                            {
173
                                (item.Markup as IDashControl).DashSize = item.DashSize;
174
                            }
175
                            if ((item.Markup as IShapeControl) != null)
176
                            {
177
                                (item.Markup as IShapeControl).Paint = item.paint;
178
                            }
179

  
180
                            comment.Add(item.Markup);
181
                        }
182

  
183
                        final = new AdornerFinal(comment);
184
                        Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
154
                        ///SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
185 155
                    }
186 156
                    break;
187
                    */
188 157
            }
158

  
189 159
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == undo.EventTime).ToList()
190 160
                .OrderByDescending(order => order.EventTime).ToList().ForEach(i =>
191 161
            {
KCOM/KCOM.csproj
556 556
      <RequiredTargetFramework>4.0</RequiredTargetFramework>
557 557
    </Reference>
558 558
    <Reference Include="Telerik.Windows.Controls, Version=2019.1.220.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
559
      <SpecificVersion>False</SpecificVersion>
559 560
      <HintPath>..\lib\RCWPF\2019.1.220.40\Telerik.Windows.Controls.dll</HintPath>
560
      <Private>True</Private>
561 561
    </Reference>
562 562
    <Reference Include="Telerik.Windows.Controls.Docking, Version=2019.1.220.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
563 563
      <HintPath>..\lib\RCWPF\2019.1.220.40\Telerik.Windows.Controls.Docking.dll</HintPath>
......
704 704
    <Compile Include="Events\CopyCommand.cs" />
705 705
    <Compile Include="Events\CreateCommand.cs" />
706 706
    <Compile Include="Events\CutCommand.cs" />
707
    <Compile Include="Events\DeleteCommand.cs" />
708 707
    <Compile Include="Events\Move.cs" />
709 708
    <Compile Include="Events\PasteCommand.cs" />
710 709
    <Compile Include="Events\TeamConsolidateCommand.cs" />
KCOM/Views/MainMenu.xaml.cs
2834 2834

  
2835 2835
            if (text_item != null && (currentControl as ArrowTextControl) == null)
2836 2836
            {
2837
                DeleteCommand.Instance.Execute(new[] { text_item });
2838
                //ViewerDataModel.Instance.MarkupControls_USER.Remove(text_item);
2837
                UndoCommand.Instance.Push(EventType.Delete, new[] { text_item });
2839 2838
            }
2840 2839

  
2841 2840
            /// up to here
......
3978 3977
                                        var vPreviousControl = previousControl as TextControl;
3979 3978
                                        if (string.IsNullOrEmpty(vPreviousControl.Text))
3980 3979
                                        {
3981
                                            DeleteCommand.Instance.Execute(new[] { previousControl });
3980
                                            UndoCommand.Instance.Push(EventType.Delete, new[] { previousControl });
3982 3981
                                            previousControl = null;
3983 3982
                                        }
3984 3983
                                        else
......
4030 4029
                                        var vPreviousControl = previousControl as TextControl;
4031 4030
                                        if (string.IsNullOrEmpty(vPreviousControl.Text))
4032 4031
                                        {
4033
                                            DeleteCommand.Instance.Execute(new[] { previousControl });
4032
                                            UndoCommand.Instance.Push(EventType.Delete, new[] { previousControl });
4034 4033
                                            previousControl = null;
4035 4034
                                        }
4036 4035
                                        else
......
4085 4084
                                        var vPreviousControl = previousControl as TextControl;
4086 4085
                                        if (string.IsNullOrEmpty(vPreviousControl.Text))
4087 4086
                                        {
4088
                                            DeleteCommand.Instance.Execute(new[] { previousControl });
4087
                                            UndoCommand.Instance.Push(EventType.Delete, new[] { previousControl });
4089 4088
                                            previousControl = null;
4090 4089
                                        }
4091 4090
                                        else
......
4700 4699

  
4701 4700
                        if (string.IsNullOrEmpty(control.ArrowText))
4702 4701
                        {
4703
                            DeleteCommand.Instance.Execute(new [] { control });
4702
                            UndoCommand.Instance.Push(EventType.Delete, new [] { control });
4704 4703
                        }
4705 4704
                    };
4706 4705

  
......
4765 4764
            var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseEnter).FirstOrDefault();
4766 4765
            if (control != null)
4767 4766
            {
4768
                DeleteCommand.Instance.Execute(new List<CommentUserInfo>() { control });
4767
                UndoCommand.Instance.Push(EventType.Delete, new List<CommentUserInfo>() { control });
4769 4768
            }
4770 4769
        }
4771 4770

  
MARKUS.wxs
285 285
        <File Id="filCB33C867CDE342B6B09DB17464950739" KeyPath="yes" Source="$(var.SourceDir)\System.Windows.Interactivity.dll" />
286 286
      </Component>
287 287
      <Component Id="cmpA8E411F92BD54821B9A3CEF8E01BBE63" Directory="MyAppDataFolder" Guid="6BF0D3C5-0684-4E7D-BC53-4CE092A48FFE" Win64="yes">
288
        <File Id="fil49E6FDC6BDFC49A5AB05A71FB2D3A5AE" KeyPath="yes" Source=".\INI\MARKUS.ini" />
288
        <File Id="fil49E6FDC6BDFC49A5AB05A71FB2D3A5AE" KeyPath="yes" Source="$(var.SourceDir)\MARKUS.ini" />
289 289
      </Component>
290 290
      <Component Id="cmpA7D3E561E3C645CAA87BCDA2052CE851" Directory="INSTALLFOLDER" Guid="2DB66F4F-9E7C-4050-BD2A-D9B825C660C1" Win64="yes">
291 291
        <File Id="filCB33C867CDE342B6B09DB17464950731" KeyPath="yes" Source="$(var.SourceDir)\Log.config" />

내보내기 Unified diff

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