프로젝트

일반

사용자정보

개정판 afaa7c92

IDafaa7c9296dcb3cdd2fedbadbb8c8190b2dec51a
상위 b0d55ac4
하위 0469e334, 8f6d4327

김동진이(가) 5년 이상 전에 추가함

issue #1038: mainmenu 에 page changed 와 changing 을 구분하여 각 컨트롤을 업데이트 하도록 수정.썸네일 프로퍼티 수정.

Change-Id: I663a283feeff15f2513605ff2da89763da345540

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
386 386
            if (App.ParameterMode)
387 387
            {
388 388
                this.pageNavigator.PageChanging += pageNavigator_PageChanging;
389
                this.pageNavigator.PageChanged += PageNavigator_PageChanged;
389 390
                imageViewer_Compare = new Image();
390 391
                ViewerDataModel.Instance.Capture_Opacity = 0;
391 392
                da.From = 0.8;
......
404 405
            timer = new Timer(timercallback, null, 0, InitInterval * 60000);
405 406
        }
406 407

  
408
        
409

  
407 410
        private void timercallback(Object o)
408 411
        {
409 412
            Stopwatch sw = new Stopwatch();
......
494 497

  
495 498
        bool ComingNewBieEnd = false;
496 499

  
500
        private void PageNavigator_PageChanged(object sender, Sample.PageChangeEventArgs e)
501
        {
502
            if (zoomAndPanCanvas2.Width.IsNaN())
503
            {
504
                zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height });
505
            }
506

  
507
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();    //전체 제거
508
            Common.ViewerDataModel.Instance.MarkupControls.Clear();         //전체 제거
509

  
510
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
511
            foreach (var info in gridSelectionItem)
512
            {
513
                Logger.sendCheckLog(String.Format("==>{0}", info), 1);
514
            }
515
            /// fire selection event
516
            this.gridViewMarkup.UnselectAll();
517
            this.gridViewMarkup.Select(gridSelectionItem);
518

  
519
            if (!testPanel2.IsHidden)
520
            {
521
                ViewerDataModel.Instance.Sync_ContentOffsetX = zoomAndPanControl.ContentOffsetX;
522
                ViewerDataModel.Instance.Sync_ContentOffsetY = zoomAndPanControl.ContentOffsetY;
523
                ViewerDataModel.Instance.Sync_ContentScale = zoomAndPanControl.ContentScale;
524

  
525
                Common.ViewerDataModel.Instance.MarkupControls_Sync.Clear();
526
                List<MarkupInfoItem> gridSelectionRevItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList();
527

  
528

  
529
                foreach (var item in gridSelectionRevItem)
530
                {
531
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
532
                    {
533
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
534
                    });
535
                }
536
            }
537

  
538
            var instanceMain = this.ParentOfType<MainWindow>();
539
            instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString();
540
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString();
541

  
542
            instanceMain.dzTopMenu.rotateOffSet = 0;
543
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault();
544
            drawingPannelRotate(pageinfo.PAGE_ANGLE);
545

  
546
            //}
547
            SetCommentPages(true);
548
        }
497 549
        private void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
498 550
        {
499 551
            Logger.sendCheckLog("pageNavigator_PageChanging_Start", 1);
......
566 618
                    ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage;
567 619
                    ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth;
568 620
                    ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight;
621
                    this.pageNavigator.SetNextPage();
569 622
                };
570 623
            }
571 624

  
......
671 724
                tlSyncPageNum.Text = String.Format("Current Page : {0}", BalancePoint);
672 725
            }
673 726

  
674
            this.pageNavigator.SetNextPage();
675

  
676
            if (zoomAndPanCanvas2.Width.IsNaN())
677
            {
678
                zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height });
679
            }
680

  
681
            Logger.sendCheckLog("-- pageNavigator_PageChanging_ControlData Setting --", 1);
682
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();    //전체 제거
683
            Common.ViewerDataModel.Instance.MarkupControls.Clear();         //전체 제거
684

  
685
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
686
            foreach (var info in gridSelectionItem)
687
            {
688
                Logger.sendCheckLog(String.Format("==>{0}", info), 1);
689
            }
690
            /// fire selection event
691
            this.gridViewMarkup.UnselectAll();
692
            this.gridViewMarkup.Select(gridSelectionItem);
693

  
694
            if (!testPanel2.IsHidden)
695
            {
696
                ViewerDataModel.Instance.Sync_ContentOffsetX = zoomAndPanControl.ContentOffsetX;
697
                ViewerDataModel.Instance.Sync_ContentOffsetY = zoomAndPanControl.ContentOffsetY;
698
                ViewerDataModel.Instance.Sync_ContentScale = zoomAndPanControl.ContentScale;
699

  
700
                Common.ViewerDataModel.Instance.MarkupControls_Sync.Clear();
701
                List<MarkupInfoItem> gridSelectionRevItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList();
702

  
703

  
704
                foreach (var item in gridSelectionRevItem)
705
                {
706
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == BalancePoint).ToList().ForEach(delegate (MarkupItem markupitem)
707
                    {
708
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
709
                    });
710
                }
711
            }
712

  
713
            var instanceMain = this.ParentOfType<MainWindow>();
714
            instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString();
715
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString();
716

  
717
            instanceMain.dzTopMenu.rotateOffSet = 0;
718
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault();
719
            drawingPannelRotate(pageinfo.PAGE_ANGLE);
720

  
721
            //}
722
            SetCommentPages(true);
723 727
        }
724 728

  
725 729

  

내보내기 Unified diff

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