프로젝트

일반

사용자정보

개정판 129ca191

ID129ca1915a4614cbe559ed03a5986204fa8631df
상위 3ffd4b2d
하위 f9fb5500, 073f6118

백흠경이(가) 5년 이상 전에 추가함

issue #923: fixed save changed controls logic

Change-Id: I434adb979a8adcf0407d75504e0ecfc48085f988

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
34 34
        public bool isClosed = true;
35 35
        public RadWindow CheckPop;
36 36
        public RadWindow OptionPop;
37
        public MarkupToPDF.Common.Undo_data UndoData;
38
        MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn();
39 37

  
40 38
        /// <summary>
41 39
        /// TaskBar에 메시지를 입력합니다
......
44 42
        /// <param name="type"></param>
45 43
        public void TaskMessage(string message, TaskMessageType type)
46 44
        {
47
            //if (taskBar != null)
48
            //{
49
            //    string color = "";
50
            //    taskBar.Content = message;
51
            //    DicTaskMessage.TryGetValue(type, out color);
52
            //    taskBar.Foreground = new SolidColorBrush(StringToColorConverter.Parse(color));
53
            //}
45
            /*
46
            if (taskBar != null)
47
            {
48
                string color = "";
49
                taskBar.Content = message;
50
                DicTaskMessage.TryGetValue(type, out color);
51
                taskBar.Foreground = new SolidColorBrush(StringToColorConverter.Parse(color));
52
            }
53
            */
54 54
        }
55 55

  
56 56
        /// <summary>
......
119 119
                    ViewerDataModel.Instance.UndoDataList.Remove(i);                    
120 120
                });
121 121
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
122
                
123

  
124 122
            }
125

  
126 123
        }
127 124

  
128 125
        private void SetHighlightEvent()
......
236 233
            SetPaintEvent();
237 234
        }
238 235

  
239
 		//강인구 추가
240
        private string SetColor(string ID)
241
        {
242
            try
243
            {
244
                return ViewerDataModel.Instance._markupInfoList.Where(info => info.MarkupInfoID == ID).First().DisplayColor;
245
            }
246
            catch (Exception)
247
            {
248
                return "#FFFFFF";
249
            }
250
        }
251

  
252 236
        void SaveTimer_Tick(object sender, EventArgs e)
253 237
        {
254 238
            //if (this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode != IKCOM.MouseHandlingMode.Drawing)
......
335 319
                // update mylist and gridview
336 320
                menu.UpdateMyMarkupList();
337 321

  
338
                if (ViewerDataModel.Instance.UndoDataList.Count == 0) return;
339

  
340
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
341
                {
342
                    this.ExecuteSaveCommand(menu);
343
                }
344
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0)
322
                if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0)
345 323
                {
346 324
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
347 325
                }
......
355 333
                            ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now;
356 334
                            if (!ViewerDataModel.Instance.IsConsolidate && (sender != null))
357 335
                            {
358
                                if (ViewerDataModel.Instance.IsPressCtrl)
359
                                {
360
                                    ViewerDataModel.Instance.IsPressCtrl = false;
361
                                }
336
                                if (ViewerDataModel.Instance.IsPressCtrl) ViewerDataModel.Instance.IsPressCtrl = false;
362 337
                                this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert");
363 338
                            }
364 339
                        }
......
404 379
            SaveCommand.Instance.Project_No = App.ViewInfo.ProjectNO;
405 380
            SaveCommand.Instance.document_id = App.ViewInfo.DocumentItemID;
406 381
            SaveCommand.Instance.user_id = App.ViewInfo.UserID;
407
            SaveCommand.Instance.page_no = Convert.ToInt32(tlcurrentPage.Text);
382
            SaveCommand.Instance.page_no = menu.pageNavigator.CurrentPage.PageNumber;
408 383

  
409 384
            try
410 385
            {
411
                this.ParentOfType<MainWindow>().dzMainMenu.ConvertInkControlToPolygon();
412

  
413
                List<IKCOM.MarkupInfoItem> SelectedMarkupInfos = new List<IKCOM.MarkupInfoItem>();
414
                foreach (var item in menu.gridViewMarkup.SelectedItems)
386
                if (ViewerDataModel.Instance.UndoDataList.Count > 0)
415 387
                {
416
                    if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
388
                    List<IKCOM.MarkupInfoItem> SelectedMarkupInfos = new List<IKCOM.MarkupInfoItem>();
389
                    foreach (var item in menu.gridViewMarkup.SelectedItems)
417 390
                    {
418
                        SelectedMarkupInfos.Add(item as IKCOM.MarkupInfoItem);
391
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
392
                        {
393
                            SelectedMarkupInfos.Add(item as IKCOM.MarkupInfoItem);
394
                        }
419 395
                    }
396

  
397
                    SaveCommand.Instance.Execute(SelectedMarkupInfos);
420 398
                }
421 399

  
422
                
423
                SaveCommand.Instance.Execute(SelectedMarkupInfos, SaveCommand.Instance.page_no);
424
                SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
400
                if(ViewerDataModel.Instance.RotationDocs.Count > 0)
401
                    SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
425 402
            }
426 403
            catch (Exception ex)
427 404
            {
......
2681 2658
                        {
2682 2659
                            if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData))
2683 2660
                            {
2684
                                markupReturn = MarkupParser.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID);
2685
                                MarkupData += "|OR|" + markupReturn.ConvertData;
2661
                                MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn res = MarkupParser.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID);
2662
                                MarkupData += "|OR|" + res.ConvertData;
2686 2663
                            }
2687 2664
                        }
2688 2665
                        Clipboard.SetText(MarkupData);
......
2705 2682
                        {
2706 2683
                            if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData))
2707 2684
                            {
2708
                                markupReturn = MarkupParser.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID);
2709
                                MarkupData += "|OR|" + markupReturn.ConvertData;
2685
                                MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn res = MarkupParser.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID);
2686
                                MarkupData += "|OR|" + res.ConvertData;
2710 2687
                            }
2711 2688
                        }
2712 2689
                        //클립보드에 넣음
......
2733 2710
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
2734 2711

  
2735 2712
                //강인구 Undo/Redo 보류
2736
                UndoData = new Undo_data()
2713
                MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
2737 2714
                {
2738 2715
                    IsUndo = false,
2739 2716
                    Event = Event_Type.Create,
......
2802 2779
                    Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
2803 2780

  
2804 2781
                    //강인구 Undo/Redo 보류
2805
                    UndoData = new Undo_data()
2782
                    MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
2806 2783
                    {
2807 2784
                        IsUndo = false,
2808 2785
                        Event = Event_Type.Create,

내보내기 Unified diff

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