프로젝트

일반

사용자정보

개정판 de6499db

IDde6499db76921f77f43e7286f62997917af81425
상위 959b3ef2
하위 6caf09aa, 24678e06

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

issue #999: rename Save.cs to SaveCommand.cs

Change-Id: I92582328e6335a5ca7de684dbeeba521b72e3c76

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
470 470
        {
471 471
            this.ParentOfType<MainWindow>().dzMainMenu.InkControl_Convert();
472 472

  
473
            Save save = new Save();
474

  
475
            //추가
476
            List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>();
477

  
478
            foreach(var item in menu.gridViewMarkup.SelectedItems)
479
            {
480
                if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
481
                {
482
                    MySelectItem.Add(item as IKCOM.MarkupInfoItem);
483
                }
484
            }
485

  
486
            //MySelectItem = (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
487

  
488

  
489
            save.Project_No = App.ViewInfo.ProjectNO;
490
            save.document_id = App.ViewInfo.DocumentItemID;
491
            save.user_id = App.ViewInfo.UserID;
492
            save.page_no = Convert.ToInt32(tlcurrentPage.Text);
473
            SaveCommand.Instance.Project_No = App.ViewInfo.ProjectNO;
474
            SaveCommand.Instance.document_id = App.ViewInfo.DocumentItemID;
475
            SaveCommand.Instance.user_id = App.ViewInfo.UserID;
476
            SaveCommand.Instance.page_no = Convert.ToInt32(tlcurrentPage.Text);
493 477

  
494 478
            try
495 479
            {
496
                menu.ChangeCommentReact();
497
                if (menu.PreviewUserMarkupInfoItem != null) //신규 코멘트인지(MarkupInfo가 없는 경우)
480
                List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>();
481
                foreach (var item in menu.gridViewMarkup.SelectedItems)
498 482
                {
499
                    if (menu.gridViewMarkup.SelectedItems.FirstOrDefault() != null) //복수 페이지 혹은 저장한 경우
483
                    if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
500 484
                    {
501
                        foreach(var item in MySelectItem)
502
                        {
503
                            save.MarkupSave(item, save.page_no);
504
                        }
505
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
506
                    }
507
                    else  //단일 페이지인 경우
508
                    {
509
                        //menu.ChangeCommentReact();
510
                        foreach (var item in MySelectItem)
511
                        {
512
                            save.MarkupSave(item, save.page_no);
513
                        }
514
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
485
                        MySelectItem.Add(item as IKCOM.MarkupInfoItem);
515 486
                    }
516 487
                }
517
                else //기존 코멘트에 작업하는 경우
518
                {
519
                    if (menu.gridViewMarkup.SelectedItems.FirstOrDefault() != null)
520
                    {
521
                        foreach (var item in MySelectItem)
522
                        {
523
                            save.MarkupSave(item, save.page_no);
524
                        }
525
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
526
                    }
527
                }
528
                save.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
529 488

  
489
                menu.ChangeCommentReact();
490
                SaveCommand.Instance.Execute(MySelectItem, SaveCommand.Instance.page_no);
491
                SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
530 492
            }
531 493
            catch (Exception ex)
532 494
            {
......
2823 2785
                    if (parse != "")
2824 2786
                    {
2825 2787
                        System.Windows.Controls.Control item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, string.Empty, string.Empty);
2826
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.Save.shortGuid();
2788
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.SaveCommand.shortGuid();
2827 2789

  
2828 2790
                        ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
2829 2791
                        ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo);
......
2885 2847

  
2886 2848
                    string temppath = System.IO.Path.GetTempPath();
2887 2849
                    //string filename = KCOM.Events.Save.shortCommentKey();
2888
                    string filename = KCOM.Events.Save.shortFileKey();
2850
                    string filename = KCOM.Events.SaveCommand.shortFileKey();
2889 2851

  
2890 2852
                    System.Drawing.Image clipboardImage = System.Windows.Forms.Clipboard.GetImage();
2891 2853
                    clipboardImage.Save(temppath + "\\" + filename);
......
2969 2931
                    ViewerDataModel.Instance.UndoDataList.Add(UndoData);
2970 2932

  
2971 2933
                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo);
2972
                    currentControl.CommentID = Events.Save.shortGuid();
2934
                    currentControl.CommentID = Events.SaveCommand.shortGuid();
2973 2935

  
2974 2936
                    currentControl.ApplyTemplate();
2975 2937
                    currentControl.SetImage();

내보내기 Unified diff

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