프로젝트

일반

사용자정보

개정판 77190232

ID77190232c37edcda2cd316c2f4e9a739099545b6
상위 0cda2a88
하위 d26860e2

임예철이(가) 약 5년 전에 추가함

Revert "markus 성능개선"

This reverts commit 0cda2a885008c0503d20d124631932685c72d462.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I419ac1ce03b0b93086040c69dfc85b13697720c0

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
438 438
        /// <param name="e"></param>
439 439
        public void DeleteCommentEvent(object sender, RoutedEventArgs e)
440 440
        {
441
            //정말 삭제 하시겠습니까?
442 441
            DialogParameters parameters = new DialogParameters()
443 442
            {
444 443
                Owner = Application.Current.MainWindow,
......
446 445
                { 
447 446
                    MinWidth = 400,
448 447
                    FontSize = 11,
449
                    Text = "Are you sure you want to delete?",
448
                    Text = "정말 삭제 하시겠습니까?",
450 449
                    TextWrapping = System.Windows.TextWrapping.Wrap
451 450
                },
452 451
                Header = "Confirm",
......
639 638
        /// <param name="e"></param>
640 639
        private async void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
641 640
        {
642
            await Task.Delay(300);
643

  
644
            await this.Dispatcher.InvokeAsync(()=>MarkupLoad(e.PageNumber));
645

  
646
            await PageChangingAsync(e.CurrentPage, e.PageNumber);
647
        }
648

  
649
        private async Task PageChangingAsync(DOCPAGE currentPage, int changePageNumber)
650
        { 
651 641
            CompareMode.IsChecked = false;
652
            var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? changePageNumber + ViewerDataModel.Instance.PageBalanceNumber : changePageNumber;
642
            var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? e.PageNumber + ViewerDataModel.Instance.PageBalanceNumber : e.PageNumber;
653 643
           
654 644
            #region 페이지가 벗어난 경우
655 645

  
......
669 659

  
670 660
            ViewerDataModel.Instance.PageNumber = BalancePoint;
671 661

  
672
            var pageWidth = Convert.ToDouble(currentPage.PAGE_WIDTH);
673
            var pageHeight = Convert.ToDouble(currentPage.PAGE_HEIGHT);
662
            var pageWidth = Convert.ToDouble(e.CurrentPage.PAGE_WIDTH);
663
            var pageHeight = Convert.ToDouble(e.CurrentPage.PAGE_HEIGHT);
674 664
            var pageUri = pageNavigator.CurrentPage.PageUri;
675 665
            var contentScale = zoomAndPanControl.ContentScale;
676 666

  
677 667
            #region 페이지 이미지 로딩 수정
678 668

  
679
            ViewerDataModel.Instance.ImageViewPath = await App.PageStorage.GetPageAsync(pageNavigator.CurrentPage.PageNumber);
680
       
669
            // ViewerDataModel.Instance.ImageViewPath = await ImageSourceHelper.GetDownloadImageAsync(pageUri, pageWidth * contentScale, pageHeight * contentScale);
670
            try
671
            {
672
                System.Diagnostics.Debug.WriteLine(pageUri);
673
                ViewerDataModel.Instance.ImageViewPath = null;
674

  
675
                new System.Net.Http.HttpClient().CancelPendingRequests();
676
                 //await Task.Delay(300);
677

  
678
                ViewerDataModel.Instance.ImageViewPath = await ImageSourceHelper.GetDownloadImageAsync(pageUri, pageWidth, pageHeight);
679
            }
680
            catch (Exception ex)
681
            {
682
                ViewerDataModel.Instance.ImageViewPath = null;
683
                string imgfailedmsg = string.Format(CommonLib.Common.GetAlertMessageString("GetImageResourceFailed", "MSG", "해당 문서의 {0} Page Convert가 정상적이지 않습니다. 관리자에게 문의해 주세요."), pageNavigator.CurrentPage.PageNumber);                
684
                DialogMessage_Alert(imgfailedmsg, "Warning");
685
                App.FileLogger.Fatal(ex);
686
            }
681 687
            ScaleImage(pageWidth, pageHeight);
682 688

  
683 689
            ViewerDataModel.Instance.ImageViewWidth = pageWidth;
......
785 791

  
786 792
            SearchFocusBorder.Visibility = Visibility.Collapsed;
787 793

  
788
            this.pageNavigator.ChangePage(changePageNumber);
794
            this.pageNavigator.ChangePage(e.PageNumber);
789 795
        }
790 796

  
791 797
        /// <summary>
......
797 803
        {
798 804
            //if (zoomAndPanCanvas.Width.IsNaN())
799 805
            //{
800

  
801
            await zoomAndPanControl.Dispatcher.InvokeAsync(() =>
806
            
807
            await zoomAndPanControl.Dispatcher.InvokeAsync(()=>
802 808
                zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height })
803 809
                );
804 810
            //}
805 811

  
806

  
807
            var instanceMain = ViewerDataModel.Instance.SystemMain;
808

  
809
            instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString();
810
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString();
811

  
812
            instanceMain.dzTopMenu.rotateOffSet = 0;
813
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault();
814
            drawingPannelRotate(pageinfo.PAGE_ANGLE);
815

  
816
            /// 페이지의 모든 마크업을 로드한 후 호출
817
            /// 좌측 마크업 list의 아이템을 클릭하는 경우 MarkupControls_USER가 0으로 나와서 추가함.
818
            ViewerDataModel.Instance.LoadPageMarkup();
819
        }
820

  
821
        private void MarkupLoad(int pageNumber)
822
        { 
823 812
            /// 컨트롤을 새로 생성한다.
824 813
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();    //전체 제거
825 814
            Common.ViewerDataModel.Instance.MarkupControls.Clear();         //전체 제거
826
            foreach (var markup in ViewerDataModel.Instance.MyMarkupList.Where(param => param.PageNumber == pageNumber))
815
            foreach (var markup in ViewerDataModel.Instance.MyMarkupList.Where(param => param.PageNumber == ViewerDataModel.Instance.PageNumber))
827 816
            { 
828 817
                var info = ViewerDataModel.Instance._markupInfoList.Where(param => param.MarkupInfoID == markup.MarkupInfoID).FirstOrDefault();
829 818
                if (info != null)
......
862 851

  
863 852
                foreach (var item in gridSelectionRevItem)
864 853
                {
865
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == pageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
854
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
866 855
                    {
867 856
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
868 857
                    });
869 858
                }
870 859
            }
860

  
861
            var instanceMain = this.ParentOfType<MainWindow>();
862
            instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString();
863
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString();
864

  
865
            instanceMain.dzTopMenu.rotateOffSet = 0;
866
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault();
867
            drawingPannelRotate(pageinfo.PAGE_ANGLE);
871 868
            
872 869
            SetCommentPages();
873 870

  
871
            /// 페이지의 모든 마크업을 로드한 후 호출
872
            /// 좌측 마크업 list의 아이템을 클릭하는 경우 MarkupControls_USER가 0으로 나와서 추가함.
873
            ViewerDataModel.Instance.LoadPageMarkup();
874 874
        }
875 875

  
876 876
        public void SetCommentPages()
......
2355 2355
            }
2356 2356
        }
2357 2357

  
2358
        private async void zoomAndPanControl_MouseDown(object sender, MouseButtonEventArgs e)
2358
        private void zoomAndPanControl_MouseDown(object sender, MouseButtonEventArgs e)
2359 2359
        {
2360 2360
            var set_option = this.ParentOfType<MainWindow>().dzTopMenu.Parent.ChildrenOfType<RadNumericUpDown>().Where(item => item.IsKeyboardFocusWithin).FirstOrDefault();
2361 2361
            if (set_option != null && !string.IsNullOrEmpty(set_option.ContentText))
......
2662 2662
                }
2663 2663
                if (init_user && gridViewMarkup.SelectedItems.Where(d => (d as MarkupInfoItem).UserID == App.ViewInfo.UserID).FirstOrDefault() == null && e.LeftButton == MouseButtonState.Pressed)
2664 2664
                {
2665
                    // 기존의 코멘트가 존재합니다. 사용자 리스트에서 먼저 선택해주세요
2666 2665
                    RadWindow.Alert(new DialogParameters
2667 2666
                    {
2668 2667
                        Owner = Application.Current.MainWindow,
2669 2668
                        Theme = new VisualStudio2013Theme(),
2670
                        Header = "Info",
2671
                        Content = "Existing comments already existed. Select from the user list first",
2669
                        Header = "안내",
2670
                        Content = "기존의 코멘트가 존재합니다. 사용자 리스트에서 먼저 선택해주세요",
2672 2671
                    });
2673 2672
                    return;
2674 2673
                }
......
3862 3861
                            {
3863 3862
                                //if (IsDrawingEnable(canvasZoomPanningMouseDownPoint))
3864 3863
                                //{
3865
                                var _sign = await BaseTaskClient.GetSignDataAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID);
3864
                                    var _sign = GetUserSign.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO,App.isExternal);
3866 3865

  
3867
                                if (_sign == null)
3866
                                    if (_sign == null)
3868 3867
                                    {
3869 3868
                                        txtBatch.Visibility = Visibility.Collapsed;
3870 3869
                                        mouseHandlingMode = IKCOM.MouseHandlingMode.None;

내보내기 Unified diff

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