프로젝트

일반

사용자정보

개정판 b2d0f316

IDb2d0f316125ad5439e7530cf5ec796805b5d1dd4
상위 ff2f8d1d
하위 5c3caba6

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

Feature: 선택한 객체를 앞으로(+)/뒤로(-) 보내기 기능 추가

Change-Id: I9130a93cfdb2d079f28258f3d669a6f532695f89

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
355 355
            {
356 356
                mainMenu.ConvertInkControlToPolygon();
357 357

  
358
                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl_MouseDown(this, new MouseButtonEventArgs(Mouse.PrimaryDevice, 0, MouseButton.Right));
359

  
360
                //SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
361
                // update mylist and gridview
362 358
                mainMenu.UpdateMyMarkupList();
363 359

  
364 360
                if (mainMenu.gridViewMarkup.SelectedItems.Count == 0 && mainMenu.gridViewMarkup.Items.Count > 0)
......
424 420
            {
425 421
                mainMenu.ConvertInkControlToPolygon();
426 422

  
427
                SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
428 423
                // update mylist and gridview
429 424
                mainMenu.UpdateMyMarkupList();
430 425

  
......
440 435
                        {
441 436
                            /// 저장 서비스 호출
442 437
                            result = await this.ExecuteSaveCommandAsync(mainMenu);
443

  
444
                            ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now;
445
                        }
446
                    }
447
                }
448

  
449
                mainMenu.SetCommentPages(null);
450

  
451
                ViewerDataModel.Instance.UndoDataList.Clear();
452
                result = true;
453
            }
454
            catch (Exception ex)
455
            {
456
                System.Diagnostics.Debug.WriteLine("_SaveEvent Error : " + ex.ToString());
457
            }
458
            finally
459
            {
460
                /*
461
                /// delete markup information when 코멘트가 없을 경우
462
                if (ViewerDataModel.Instance.MyMarkupList.Count == 0)
463
                {
464
                    foreach (var item in menu.gridViewMarkup.SelectedItems)
465
                    {
466
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
467
                        {
468
                            //this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem));
469
                        }
470
                    }
471
                }
472
                */
473
            }
474

  
475
            return result;
476
        }
477

  
478
        public bool SaveEvent()
479
        {
480
            bool result = false;
481

  
482
            var mainMenu = this.ParentOfType<MainWindow>().dzMainMenu;
483
            try
484
            {
485
                mainMenu.ConvertInkControlToPolygon();
486

  
487
                SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
488
                // update mylist and gridview
489
                mainMenu.UpdateMyMarkupList();
490

  
491
                if (mainMenu.gridViewMarkup.SelectedItems.Count == 0 && mainMenu.gridViewMarkup.Items.Count > 0)
492
                {
493
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
494
                }
495
                else
496
                {
497
                    foreach (var item in mainMenu.gridViewMarkup.SelectedItems)
498
                    {
499
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
500
                        {
501
                            /// 저장 서비스 호출
502
                            result = this.ExecuteSaveCommandAsync(mainMenu).GetAwaiter().GetResult();
503

  
504 438
                            ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now;
505 439
                        }
506 440
                    }
......
536 470
        }
537 471

  
538 472
        /// <summary>
539
        /// call save command
473
        /// 마크업 데이터를 저장한다.
540 474
        /// </summary>
541 475
        /// <param name="menu"></param>
542
		public void ExecuteSaveCommand2(MainMenu menu)
543
        {
544
            if (menu.pageNavigator.CurrentPage != null)
545
            {
546
                SaveCommand.Instance.Project_No = App.ViewInfo.ProjectNO;
547
                SaveCommand.Instance.document_id = App.ViewInfo.DocumentItemID;
548
                SaveCommand.Instance.user_id = App.ViewInfo.UserID;
549
                SaveCommand.Instance.page_no = menu.pageNavigator.CurrentPage.PageNumber;
550

  
551
                try
552
                {
553
                    if (ViewerDataModel.Instance.UndoDataList.Count > 0)
554
                    {
555
                        List<IKCOM.MarkupInfoItem> SelectedMarkupInfos = new List<IKCOM.MarkupInfoItem>();
556
                        foreach (var item in menu.gridViewMarkup.SelectedItems)
557
                        {
558
                            if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
559
                            {
560
                                SelectedMarkupInfos.Add(item as IKCOM.MarkupInfoItem);
561
                            }
562
                        }
563

  
564
                        SaveCommand.Instance.Execute(SelectedMarkupInfos);
565
                    }
566

  
567
                    if (ViewerDataModel.Instance.RotationDocs.Count > 0)
568
                    {
569
                        SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
570
                    }
571
                }
572
                catch (Exception ex)
573
                {
574
                    this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert(string.Format("세이브 실패:{0}", ex.Message), "Alert");
575
                    throw ex;
576
                }
577
            }
578
            else
579
            {
580
                System.Diagnostics.Debug.WriteLine("ExecuteSaveCommand Error - pageNavigator.CurrentPage null");
581
            }
582
        }
476
        /// <returns></returns>
583 477
        public async Task<bool> ExecuteSaveCommandAsync(MainMenu menu)
584 478
        {
585 479
            bool result = false;
......
620 514
                catch (Exception ex)
621 515
                {
622 516
                    this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert(string.Format("세이브 실패:{0}", ex.Message), "Alert");
623
                    throw ex;
624
                }
625
            }
626
            else
627
            {
628
                System.Diagnostics.Debug.WriteLine("ExecuteSaveCommand Error - pageNavigator.CurrentPage null");
629
            }
630

  
631
            return result;
632
        }
633

  
634
        public bool ExecuteSaveCommand(MainMenu menu)
635
        {
636
            bool result = false;
637

  
638
            if (menu.pageNavigator.CurrentPage != null)
639
            {
640
                SaveCommand.Instance.Project_No = App.ViewInfo.ProjectNO;
641
                SaveCommand.Instance.document_id = App.ViewInfo.DocumentItemID;
642
                SaveCommand.Instance.user_id = App.ViewInfo.UserID;
643
                SaveCommand.Instance.page_no = menu.pageNavigator.CurrentPage.PageNumber;
644

  
645
                try
646
                {
647
                    if (ViewerDataModel.Instance.UndoDataList.Count > 0 || ViewerDataModel.Instance.IsMarkupUpdate)
648
                    {
649
                        List<IKCOM.MarkupInfoItem> SelectedMarkupInfos = new List<IKCOM.MarkupInfoItem>();
650
                        foreach (var item in menu.gridViewMarkup.SelectedItems)
651
                        {
652
                            if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
653
                            {
654
                                SelectedMarkupInfos.Add(item as IKCOM.MarkupInfoItem);
655
                            }
656
                        }
657

  
658
                        result = SaveCommand.Instance.Execute(SelectedMarkupInfos).GetAwaiter().GetResult();
659
                        ViewerDataModel.Instance.IsMarkupUpdate = false;
660
                    }
661
                    else
662
                    {
663
                        result = true;
664
                    }
665

  
666
                    if (ViewerDataModel.Instance.RotationDocs.Count > 0)
667
                    {
668
                        SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
669
                    }
670
                }
671
                catch (Exception ex)
672
                {
673
                    this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert(string.Format("세이브 실패:{0}", ex.Message), "Alert");
674
                    throw ex;
517
                    throw new InvalidOperationException(ex.Message);
675 518
                }
676 519
            }
677 520
            else

내보내기 Unified diff

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