프로젝트

일반

사용자정보

개정판 b2d0f316

IDb2d0f316125ad5439e7530cf5ec796805b5d1dd4
상위 ff2f8d1d
하위 5c3caba6

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

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

Change-Id: I9130a93cfdb2d079f28258f3d669a6f532695f89

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
639 639
        {
640 640
            Logger.sendCheckLog("pageNavigator_PageChanging_ChangeCommentReact", 1);
641 641

  
642
            #region 선택된 객체를 선택 해제한다.(그래야 작업 내용이 적용됨)
643
            SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
644
            #endregion
645

  
642 646
            /// add or update markup list
643 647
            foreach (var control in ViewerDataModel.Instance.MarkupControls_USER)
644 648
            {
645
                var root = MarkupParser.MarkupToString(control, App.ViewInfo.UserID);
649
                var markup = MarkupParser.MarkupToString(control, App.ViewInfo.UserID);
646 650

  
647
                var exist = ViewerDataModel.Instance.MyMarkupList.Find(data => data.ID == root.CommentID);
648
                if (exist != null) //신규 추가 된 코멘트
651
                var exist = ViewerDataModel.Instance.MyMarkupList.Find(data => data.ID == markup.CommentID);
652
                #region 기존 코멘트
653
                if (exist != null) 
649 654
                {
650
                    if (exist.Data != root.ConvertData) //코멘트가 같은지
655
                    if (exist.Data != markup.ConvertData) //코멘트가 같은지
651 656
                    {
652
                        exist.Data = root.ConvertData;
657
                        exist.Data = markup.ConvertData;
658
                        exist.ZIndex = control.ZIndex;
653 659
                        exist.IsUpdate = true;
654 660
                    }
655 661
                }
656
                else if (root.CommentID != null)
662
                #endregion
663
                else if (markup.CommentID != null)
657 664
                {
658 665
                    ViewerDataModel.Instance.MyMarkupList.Add(new MarkupItemEx
659 666
                    {
660 667
                        ID = control.CommentID,
661
                        Data = root.ConvertData,
662
                        Data_Type = root.DATA_TYPE,
668
                        Data = markup.ConvertData,
669
                        Data_Type = markup.DATA_TYPE,
663 670
                        MarkupInfoID = App.Custom_ViewInfoId,
664 671
                        PageNumber = this.pageNavigator.CurrentPage.PageNumber,
665 672
                        Symbol_ID = control.SymbolID,
666
                        //Group_ID = control.GroupID,
673
                        ZIndex = control.ZIndex,
667 674
                    });
668 675
                }
669 676
            }
670

  
671
            //if (this.pageNavigator.CurrentPage != null)
672
            //{
673
            //    /// delete markup list
674
            //    int iPageNo = this.pageNavigator.CurrentPage.PageNumber;
675

  
676
            //    var deleted = (from markup in ViewerDataModel.Instance.MyMarkupList
677
            //                   where (markup.PageNumber == iPageNo)
678
            //                   && (null == ViewerDataModel.Instance.MarkupControls_USER.Where(control => control.CommentID == markup.ID).FirstOrDefault())
679
            //                   select markup).ToList();
680

  
681
            //    foreach (var markup in deleted)
682
            //    {
683
            //        ViewerDataModel.Instance.MyMarkupList.Remove(markup);
684
            //    }
685
            //}
686
            //else
687
            //{
688
            //    System.Diagnostics.Debug.WriteLine("UpdateMyMarkupList : this.pageNavigator.CurrentPage null ");
689
            //}
690

  
691
            /// up to here
692

  
693
            //if (modified)
694
            //{
695
            //    if (ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == PreviewUserMarkupInfoItem.UserID).FirstOrDefault() == null)
696
            //    {
697
            //        ComingNewBieEnd = true;
698
            //        ViewerDataModel.Instance._markupInfoList.Insert(0, PreviewUserMarkupInfoItem);
699
            //        PreviewUserMarkupInfoItem.IsPreviewUser = false;
700
            //        gridViewMarkup.ItemsSource = null;
701
            //        gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
702
            //        gridViewMarkup.SelectedItem = PreviewUserMarkupInfoItem;
703

  
704
            //        GroupDescriptor descriptor = new GroupDescriptor();
705
            //        descriptor.Member = "Depatment";
706
            //        descriptor.DisplayContent = "DEPT";
707
            //        descriptor.SortDirection = ListSortDirection.Ascending;
708
            //        gridViewMarkup.GroupDescriptors.Add(descriptor);
709
            //    }
710
            //}
711 677
        }
712 678

  
713 679
        /// <summary>
......
915 881
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString();
916 882

  
917 883
            instanceMain.dzTopMenu.rotateOffSet = 0;
918
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault();
884
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.FirstOrDefault(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER);
919 885
            drawingPannelRotate(pageinfo.PAGE_ANGLE);
920 886

  
921 887
            /// 페이지의 모든 마크업을 로드한 후 호출
922 888
            /// 좌측 마크업 list의 아이템을 클릭하는 경우 MarkupControls_USER가 0으로 나와서 추가함.
923 889
            ViewerDataModel.Instance.LoadPageMarkupFinish(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height });
924

  
925
            //Point startPoint = new Point(15, 15);
926

  
927
            //var markupinfo = ViewerDataModel.Instance._markupInfoList.Where(x => x.UserID == App.ViewInfo.UserID).First();
928

  
929
            ////var rect = GetRectControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID, startPoint);
930

  
931
            ////var txtApproved = GetTextControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID,
932
            ////                             "APPROVED",30, FontWeights.Bold, TextAlignment.Center, rect.ItemRect, 15);
933

  
934
            ////var txtCreator = GetTextControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID
935
            ////                , "By HYOSUNG", 18, FontWeights.Bold, TextAlignment.Center, rect.ItemRect, txtApproved.StartPoint.Y + txtApproved.BoxHeight + 3);
936

  
937
            //var symCtrl = GetSymNControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID, startPoint);
938

  
939
            //var bottom = Rect.Offset(symCtrl.ItemRect, new Vector(0, symCtrl.ItemRect.Height));
940

  
941
            //var txtOriginator = GetTextControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID
942
            //               , App.ViewInfo.UserID, 18, FontWeights.Bold, TextAlignment.Left, bottom, bottom.Top + 3);
943

  
944
            //var dtfi = new System.Globalization.DateTimeFormatInfo { DateSeparator = "-", ShortDatePattern = @"yyyy/MM/dd" };
945

  
946
            //var txtDate = GetTextControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID
947
            //               , DateTime.Now.ToString("d", dtfi), 18, FontWeights.Bold, TextAlignment.Left, bottom, txtOriginator.StartPoint.Y + txtOriginator.BoxHeight + 2);
948

  
949
            //ViewerDataModel.Instance.MarkupControls_USER.Add(symCtrl);
950
            ////ViewerDataModel.Instance.MarkupControls_USER.Add(txtApproved);
951
            ////ViewerDataModel.Instance.MarkupControls_USER.Add(txtCreator);
952
            //ViewerDataModel.Instance.MarkupControls_USER.Add(txtOriginator);
953
            //ViewerDataModel.Instance.MarkupControls_USER.Add(txtDate);
954

  
955
            //symCtrl.ApplyTemplate();
956
            ////txtApproved.ApplyTemplate();
957
            ////txtCreator.ApplyTemplate();
958
            //txtOriginator.ApplyTemplate();
959
            //txtDate.ApplyTemplate();
960

  
961
            ////SetTextControl(txtApproved);
962
            ////SetTextControl(txtCreator);
963
            //SetTextControl(txtOriginator);
964
            //SetTextControl(txtDate);
965

  
966
            //multi_UndoData = new Multi_UndoData();
967

  
968
            //MarkupToPDF.Common.UndoData UndoData = new UndoData()
969
            //{
970
            //    IsUndo = false,
971
            //    Event = EventType.Create,
972
            //    EventTime = DateTime.Now,
973
            //    MarkupDataColl = new List<Multi_UndoData>()
974
            //};
975

  
976
            //multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(symCtrl as MarkupToPDF.Common.CommentUserInfo);
977
            //UndoData.MarkupDataColl.Add(multi_UndoData);
978

  
979
            ////multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtApproved as MarkupToPDF.Common.CommentUserInfo);
980
            ////UndoData.MarkupDataColl.Add(multi_UndoData);
981

  
982
            ////multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtCreator as MarkupToPDF.Common.CommentUserInfo);
983
            ////UndoData.MarkupDataColl.Add(multi_UndoData);
984

  
985
            //multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtOriginator as MarkupToPDF.Common.CommentUserInfo);
986
            //UndoData.MarkupDataColl.Add(multi_UndoData);
987

  
988
            //multi_UndoData = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(txtDate as MarkupToPDF.Common.CommentUserInfo);
989
            //UndoData.MarkupDataColl.Add(multi_UndoData);
990

  
991
            //ViewerDataModel.Instance.UndoDataList.Add(UndoData);
992

  
993
            //System.Diagnostics.Debug.WriteLine(symCtrl.GetMarkupData(App.ViewInfo.UserID, 1, markupinfo.MarkupVersionID).DATA);
994
            ////System.Diagnostics.Debug.WriteLine(txtApproved.GetMarkupData(App.ViewInfo.UserID, 1, markupinfo.MarkupVersionID).DATA);
995
            ////System.Diagnostics.Debug.WriteLine(txtCreator.GetMarkupData(App.ViewInfo.UserID, 1, markupinfo.MarkupVersionID).DATA);
996
            //System.Diagnostics.Debug.WriteLine(txtOriginator.GetMarkupData(App.ViewInfo.UserID, 1, markupinfo.MarkupVersionID).DATA);
997
            //System.Diagnostics.Debug.WriteLine(txtDate.GetMarkupData(App.ViewInfo.UserID, 1, markupinfo.MarkupVersionID).DATA);
998 890
        }
999 891

  
1000 892
        private void SetTextControl(TextControl textControl)
......
1161 1053
            return e.DesiredSize;
1162 1054
        }
1163 1055

  
1056
        /// <summary>
1057
        /// 주어진 pageNumber의 마크업 데이터를 읽어 화면에 표시한다.
1058
        /// </summary>
1059
        /// <param name="pageNumber"></param>
1060
        /// <param name="PageAngle"></param>
1061
        /// <param name="cts"></param>
1062
        /// <returns></returns>
1164 1063
        private async Task MarkupLoadAsync(int pageNumber,Double PageAngle, CancellationToken cts)
1165 1064
        {
1166 1065
            System.Diagnostics.Stopwatch stopwatch = new Stopwatch();
1167 1066
            stopwatch.Start();
1168 1067

  
1169
            /// 컨트롤을 새로 생성한다.
1068
            #region 컨트롤을 새로 생성한다.
1170 1069
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();    //전체 제거
1171 1070
            Common.ViewerDataModel.Instance.MarkupControls.Clear();         //전체 제거
1172 1071

  
......
1179 1078
                    return;
1180 1079
                }
1181 1080

  
1182
                var info = ViewerDataModel.Instance._markupInfoList.Where(param => param.MarkupInfoID == markup.MarkupInfoID).FirstOrDefault();
1081
                var info = ViewerDataModel.Instance._markupInfoList.FirstOrDefault(param => param.MarkupInfoID == markup.MarkupInfoID);
1183 1082
                if (info != null)
1184 1083
                {
1185 1084
                    string sColor = (info.UserID == App.ViewInfo.UserID) ? "#FFFF0000" : info.DisplayColor;
......
1187 1086
                    {
1188 1087
                        var control = await MarkupParser.ParseExAsync(App.BaseAddress, cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, PageAngle, sColor, "",
1189 1088
                                        markup.MarkupInfoID, markup.ID);
1089
                        Canvas.SetZIndex(control, (control as CommentUserInfo).ZIndex);
1190 1090
                        control.Visibility = Visibility.Hidden;
1191 1091
                    }
1192 1092
                    else
1193 1093
                    {
1194 1094
                        var control = await MarkupParser.ParseExAsync(App.BaseAddress, cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, PageAngle, sColor, "",
1195 1095
                                                                markup.MarkupInfoID, markup.ID);
1096
                        Canvas.SetZIndex(control, (control as CommentUserInfo).ZIndex);
1196 1097
                        control.Visibility = Visibility.Hidden;
1197 1098
                    }
1198 1099
                }
1199
            };
1200
            /// up to here
1100
            }
1101
            #endregion
1201 1102

  
1202 1103
            System.Diagnostics.Debug.WriteLine("MarkupLoad - MarkupParser " + new TimeSpan(stopwatch.ElapsedTicks).ToString());
1203 1104

  
1204 1105
            /// fire selection event
1205
            // DIG 요청으로 첫 로드시 전체 선택 되도록 수정 2024-06-04 IRON
1206
            // 다른 페이지 넘어갈 시 메시지 박스가 여러개 떠서 추가기능 주석 처리 2024-06-05 IRON
1207
            //gridViewMarkup.SelectAll(); 
1208 1106
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
1209 1107
            this.gridViewMarkup.UnselectAll();
1210 1108
            this.gridViewMarkup.Select(gridSelectionItem);
......
4971 4869
            }
4972 4870
        }
4973 4871

  
4872
        /// <summary>
4873
        /// Final PDF를 실행한다.
4874
        /// </summary>
4875
        /// <param name="sender"></param>
4876
        /// <param name="e"></param>
4974 4877
        private async void FinalPDFEvent(object sender, RoutedEventArgs e)
4975 4878
        {
4976
            SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
4977 4879
            // update mylist and gridview
4978 4880
            this.UpdateMyMarkupList();
4979 4881

  
......
4985 4887
            }
4986 4888
            else
4987 4889
            {
4988
                var item = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(d => d.Consolidate == 1 && d.AvoidConsolidate == 0).FirstOrDefault();
4989

  
4890
                var item = gridViewMarkup.Items.Cast<MarkupInfoItem>().FirstOrDefault(d => d.Consolidate == 1 && d.AvoidConsolidate == 0);
4990 4891
                if (item != null)
4991 4892
                {
4992 4893
                    if (BaseClient.FinalPDF_GetFinalPDFStatus(_DocInfo.ID, item.MarkupInfoID, _ViewInfo.UserID))
......
5008 4909
                    DialogMessage_Alert("Consolidation 된 코멘트가 존재하지 않습니다", "안내");
5009 4910
                }
5010 4911
            }
5011

  
5012 4912
        }
5013 4913

  
5014 4914
        private void btnFinalPDF_Loaded(object sender, RoutedEventArgs e)

내보내기 Unified diff

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