프로젝트

일반

사용자정보

개정판 8a9f6742

ID8a9f67428820225a917ad4b296dd1c0cc8943681
상위 a40244a2
하위 385f016d

김동진이(가) 약 6년 전에 추가함

issue #670 image load modify

차이점 보기:

KCOM/Views/MainMenu.xaml
162 162
                                                <!--<MarkupToPDF:RectangleControl Height="200" HorizontalAlignment="Center" Name="rectangle2" StrokeColor="Black" VerticalAlignment="Top" Width="00" FillColor="Red"/>-->
163 163
                                            </InkCanvas>
164 164
                                            <!--강인구 추가-->
165
                                            <Image Panel.ZIndex="0"
165
                                                <Image Panel.ZIndex="0" x:Name="mainPanel"
166 166
                                                   Source="{Binding ImageViewPath, Source={x:Static common:ViewerDataModel.Instance}}" 
167 167
                                                   Width="{Binding ImageViewWidth, Source={x:Static common:ViewerDataModel.Instance}}" 
168 168
                                                   Height="{Binding ImageViewHeight, Source={x:Static common:ViewerDataModel.Instance}}" >
KCOM/Views/MainMenu.xaml.cs
711 711
                uri = String.Format(Properties.Settings.Default.subServerImageWebPath, _ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, e.PageNumber);
712 712
            }
713 713

  
714
            var defaultBitmapImage = new BitmapImage(new Uri(uri));
715

  
714
            var defaultBitmapImage = new BitmapImage();
715
            defaultBitmapImage.BeginInit();
716
            defaultBitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
717
            defaultBitmapImage.CacheOption = BitmapCacheOption.OnLoad;
718
            defaultBitmapImage.UriSource = new Uri(uri);
719
            defaultBitmapImage.EndInit();
720

  
721
            ViewerDataModel.Instance.ImageViewPath = null;
722
            GC.Collect();
716 723
            ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage;
717 724
            ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth;
718 725
            ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight;
......
721 728
            {
722 729
                defaultBitmapImage.DownloadCompleted += (ex, arg) =>
723 730
                {
731
                    defaultBitmapImage.Freeze();
732
                    mainPanel.UpdateLayout();
733
                    GC.Collect();
734
                    //System.Diagnostics.Debug.WriteLine("image changed");
724 735
                    ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage;
725 736
                    ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth;
726 737
                    ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight;

내보내기 Unified diff

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