프로젝트

일반

사용자정보

개정판 bb4e3ec4

IDbb4e3ec4777a227f43739f522109591ecb06f57e
상위 0469e334
하위 77bcd0c6

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

issue #000 pdfmode visible false(임시), page image load방법 수정.

Change-Id: I2c2268fbf929051eecfa577847df7868aa8ec521

차이점 보기:

KCOM/Views/MainMenu.xaml
332 332
                                                                       Margin="5" Checked="SyncCompare_Click" Unchecked="SyncCompare_Click" BorderThickness="0" telerik:StyleManager.Theme="Office2013"/>
333 333

  
334 334
                                        <toggle:HorizontalToggleSwitch x:Name="MarkupMode" CheckedContent="Pdf" UncheckedContent="Markup" Width="75" IsChecked="False" ThumbSize="25"
335
                                                                       FontSize="10" FontWeight="Normal" BorderBrush="Transparent" Opacity="0.6"
335
                                                                       FontSize="10" FontWeight="Normal" BorderBrush="Transparent" Opacity="0.6" Visibility="Collapsed"
336 336
                                                                       Margin="5" Checked="SyncChange_Click" Unchecked="SyncChange_Click" BorderThickness="0" telerik:StyleManager.Theme="Office2013"/>
337 337

  
338 338
                                        <toggle:HorizontalToggleSwitch x:Name="BalanceMode" CheckedContent="Balance On" UncheckedContent="Balance Off" Width="90" IsChecked="False" ThumbSize="25"
KCOM/Views/MainMenu.xaml.cs
548 548
        }
549 549
        private void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
550 550
        {
551
            Logger.sendCheckLog("pageNavigator_PageChanging_Start", 1);
551
            
552 552
            if (ViewerDataModel.Instance.UndoDataList.Count > 0)
553
            {
554
                Logger.sendCheckLog("pageNavigator_PageChanging_이전페이지Save", 1);
553
            {            
555 554
                this.ParentOfType<MainWindow>().dzTopMenu.SaveEvent(null, null);
556 555
            }
557
            Logger.sendCheckLog("pageNavigator_PageChanging_UndoDataListClear", 1);
556
            
558 557
            ViewerDataModel.Instance.UndoDataList.Clear();
559 558

  
560 559
            ConvertInkControlToPolygon();
......
562 561
            SelectionSet.Instance.UnSelect(this);
563 562
            UpdateMyMarkupList();
564 563

  
565
            Logger.sendCheckLog("pageNavigator_PageChanging_변수생성 및 값 설정", 1);
566 564
            CompareMode.IsChecked = false;
567 565
            var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? e.PageNumber + ViewerDataModel.Instance.PageBalanceNumber : e.PageNumber;
568 566

  
......
585 583

  
586 584
            ViewerDataModel.Instance.PageNumber = BalancePoint;
587 585

  
588
            Logger.sendCheckLog("pageNavigator_PageChanging_페이지 Image url 설정", 1);
589 586
            string uri = "";
590 587
            if (userData.COMPANY != "EXT")
591 588
            {
......
598 595

  
599 596
            var defaultBitmapImage = new BitmapImage();
600 597
            defaultBitmapImage.BeginInit();
601
            defaultBitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
602 598
            defaultBitmapImage.CacheOption = BitmapCacheOption.OnLoad;
603 599
            defaultBitmapImage.UriSource = new Uri(uri);
600
            defaultBitmapImage.DecodePixelWidth = Int32.Parse(e.CurrentPage.PAGE_WIDTH);
601
            defaultBitmapImage.DecodePixelHeight = Int32.Parse(e.CurrentPage.PAGE_HEIGHT);
604 602
            defaultBitmapImage.EndInit();
605 603

  
606
            ViewerDataModel.Instance.ImageViewPath = null;
607
            GC.Collect();
604
            ViewerDataModel.Instance.ImageViewPath = null;            
608 605

  
609 606
            Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage Downloading", 1);
610 607
            if (defaultBitmapImage.IsDownloading)
......
612 609
                Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage IsDownloading", 1);
613 610
                defaultBitmapImage.DownloadCompleted += (ex, arg) =>
614 611
                {
615
                    defaultBitmapImage.Freeze();
616
                    mainPanel.UpdateLayout();
617
                    GC.Collect();
612
                    defaultBitmapImage.Freeze();                                        
618 613
                    ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage;
619 614
                    ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth;
620 615
                    ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight;
621
                    this.pageNavigator.SetNextPage();
616
                    mainPanel.UpdateLayout();
617
                    this.pageNavigator.SetNextPage(); 
618
                    
619
                    //image dispose
620
                    defaultBitmapImage = null;
621
                    GC.Collect();
622 622
                };
623 623
            }
624 624

  
......
681 681

  
682 682
                    Logger.sendCheckLog("pageNavigator_PageChanging_defaultBitmapImage_Compare BitmapImage 설정", 1);
683 683
                    var defaultBitmapImage_Compare = new BitmapImage(new Uri(uri2));
684
                    defaultBitmapImage_Compare.BeginInit();
685
                    defaultBitmapImage_Compare.CacheOption = BitmapCacheOption.OnLoad;
686
                    defaultBitmapImage_Compare.UriSource = new Uri(uri2);
687
                    defaultBitmapImage_Compare.DecodePixelWidth = Int32.Parse(e.CurrentPage.PAGE_WIDTH);
688
                    defaultBitmapImage_Compare.DecodePixelHeight = Int32.Parse(e.CurrentPage.PAGE_HEIGHT);
689
                    defaultBitmapImage_Compare.EndInit();
684 690

  
685
                    Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanCanvas2 Page Setting", 1);
686
                    ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare;
687
                    ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth;
688
                    ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
689
                    zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth;
690
                    zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight;
691
                    ViewerDataModel.Instance.ImageViewPath_C = null;                    
691 692

  
692 693
                    Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanControl ZoomTo 설정", 1);
693 694
                    zoomAndPanControl.ZoomTo(new Rect
......
703 704
                    {
704 705
                        defaultBitmapImage_Compare.DownloadCompleted += (ex, arg) =>
705 706
                        {
706
                            Logger.sendCheckLog("pageNavigator_PageChanging_defaultBitmapImage_Compare DownloadCompleted", 1);
707
                            defaultBitmapImage_Compare.Freeze();
707 708
                            ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare;
708 709
                            ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth;
709 710
                            ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
710

  
711 711
                            zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth;
712 712
                            zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight;
713 713

  
......
718 718
                                Width = Math.Max(zoomAndPanCanvas.Width, zoomAndPanCanvas2.Width),
719 719
                                Height = Math.Max(zoomAndPanCanvas.Height, zoomAndPanCanvas2.Height),
720 720
                            });
721

  
722
                            //defaultBitmapImage_Compare dispose
723
                            defaultBitmapImage_Compare = null;
724
                            GC.Collect();
721 725
                        };
722 726
                    }
723 727
                }

내보내기 Unified diff

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