프로젝트

일반

사용자정보

개정판 69f41aab

ID69f41aab39e8801f951461c3b5682c82277ba98d
상위 b79f786f
하위 f3b312d2, 0c368b45

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

issue #1180: Image URL 설정 - Image URI를 가져오는 부분을 하나의 함수로 만듦

Change-Id: I2d13cc6156627af2e00b9557939973a7d94d04d2

차이점 보기:

KCOM/Controls/PageNavigator.xaml.cs
72 72
            this._PageList = PageList;
73 73
            this._DefaultUri = DefaultUri;
74 74
            ThumbnailSet();
75
            //ThumbNmailSet();
76
            //rdoAllPages.Checked += new RoutedEventHandler(rdoCommented_Checked);
77
            //rdoFavoritePages.Checked += new RoutedEventHandler(rdoFavoritePages_Checked);
78
            //expCommentPages.PreviewCollapsed += new RadRoutedEventHandler(expCommentPages_PreviewCollapsed);
79
            //expCommentPages.PreviewExpanded += new RadRoutedEventHandler(expCommentPages_PreviewExpanded);
80 75
        }
81 76
        private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
82 77
        {
......
141 136

  
142 137
            this._thumbnailItems = new ObservableCollection<ThumbnailItem>();
143 138

  
144
            //if (this.lstSelectComment.ItemsSource != null)
145
            //{
146
            //    var _pages = from commentPage in this.lstSelectComment.ItemsSource.Cast<UsersCommentPagesMember>()
147
            //                 where commentPage.IsSelected == true
148
            //                 select commentPage.PageNumber;
149

  
150
            //    foreach (var item in _pages)
151
            //    {
152
            //        item.ForEach(pp => _selectComment.Add(pp));
153
            //    }
154

  
155
            //    _selectComment.Distinct();
156
            //}
157

  
158 139
            var uri = _DefaultUri.Replace("{0}/{1}_{2}", "8/0_0");
159 140
            this._PageList = this._PageList.OrderBy(data => data.PAGE_NUMBER).ToList();
160 141
            this._PageList.ForEach(page =>
161 142
            {
162 143
                var _pageNo = page.PAGE_NUMBER;
163
                bool _addFlag = false;
164

  
165 144

  
166 145
                this._thumbnailItems.Add(new ThumbnailItem
167 146
                {
168 147
                    ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())),
169

  
170
                    //ImageUri = new Uri(@"http://www.honeyhead.net/Pages/000000/111111/11111111/1.cmp"),
171

  
172
                    //ImageUri = new Uri(@"https://image.freepik.com/free-vector/abstract-logo-in-flame-shape_1043-44.jpg"),
173

  
174

  
175 148
                    PageNumber = Convert.ToInt32(_pageNo),
176 149
                    Angle = Convert.ToInt32(page.PAGE_ANGLE),
177 150
                });
KCOM/Controls/Sample.xaml.cs
79 79

  
80 80
        public void SetPageNavi(List<DOCPAGE> PageList, string DefaultUri)
81 81
        {
82
            Logger.sendCheckLog("SetPageNavi", 1);
83 82
            this._PageList = PageList;
84 83
            this._DefaultUri = DefaultUri;
85 84
            ThumbnailSet();
KCOM/Views/MainMenu.xaml.cs
259 259
            this.Cursor = cursor;
260 260
        }
261 261

  
262
        /// <summary>
263
        /// get image url
264
        /// </summary>
265
        /// <author>humkyung</author>
266
        /// <param name="sDocumentID"></param>
267
        /// <returns></returns>
268
        private string GetImageURL(string sDocumentID, int iPageNo)
269
        {
270
            string uri = string.Empty;
271

  
272
            string sFolder = sDocumentID.All(char.IsDigit) ? (Convert.ToUInt32(sDocumentID) / 100).ToString() : (sDocumentID.Length >= 5 ? sDocumentID.Substring(0, 5) : sDocumentID);
273
            if (userData.COMPANY != "EXT")
274
            {
275
                uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, sFolder, sDocumentID, iPageNo);
276
            }
277
            else
278
            {
279
                uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, sDocumentID, iPageNo);
280
            }
281

  
282
            return uri;
283
        }
284

  
262 285
        private bool IsDrawingEnable(Point _canvasZoomPanningMouseDownPoint)
263 286
        {
264 287
            if ((_canvasZoomPanningMouseDownPoint.X > 0 &&
......
621 644
                else
622 645
                {
623 646
                    Logger.sendCheckLog("pageNavigator_PageChanging_uri2 값 설정", 1);
624
                    string uri2 = "";
625
                    if (userData.COMPANY != "EXT")
626
                    {
627
                        uri2 = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, BalancePoint);
628
                    }
629
                    else
630
                    {
631
                        uri2 = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, BalancePoint);
632
                    }
647
                    string uri2 = this.GetImageURL(CurrentRev.DOCUMENT_ID, BalancePoint);
633 648

  
634 649
                    Logger.sendCheckLog("pageNavigator_PageChanging_defaultBitmapImage_Compare BitmapImage 설정", 1);
635 650
                    var defaultBitmapImage_Compare = new BitmapImage();
......
1795 1810
            }
1796 1811
            var rect = new Int32Rect((int)x, (int)y, (int)width, (int)height);
1797 1812

  
1798
            string uri = "";
1799
            if (userData.COMPANY != "EXT")
1800
            {
1801
                uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO,
1802
                    (Convert.ToInt32(_ViewInfo.DocumentItemID) / 100).ToString(), _ViewInfo.DocumentItemID, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber);
1803
            }
1804
            else
1805
            {
1806
                uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, _ViewInfo.DocumentItemID,
1807
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber);
1808
            }
1809

  
1813
            string uri = this.GetImageURL(_ViewInfo.DocumentItemID, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber);
1810 1814
            var defaultBitmapImage = new BitmapImage();
1811 1815
            defaultBitmapImage.BeginInit();
1812 1816
            defaultBitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
......
4259 4263
                    }
4260 4264
                    else
4261 4265
                    {
4262
                        string uri = "";
4263

  
4264
                        if (userData.COMPANY != "EXT")
4265
                        {
4266
                            uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.PageNumber);
4267
                        }
4268
                        else
4269
                        {
4270
                            uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.PageNumber);
4271
                        }
4266
                        string uri = this.GetImageURL(_ViewInfo.ProjectNO, ViewerDataModel.Instance.PageNumber);
4272 4267

  
4273 4268
                        var defaultBitmapImage_Compare = new BitmapImage(new Uri(uri));
4274 4269

  
......
4361 4356
            else
4362 4357
            {
4363 4358
                IsSyncPDFMode = false;
4364
                string uri = "";
4365
                if (userData.COMPANY != "EXT")
4366
                {
4367
                    uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4368
                }
4369
                else
4370
                {
4371
                    uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4372
                }
4359
                string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4373 4360

  
4374 4361
                var defaultBitmapImage_Compare = new BitmapImage(new Uri(uri));
4375 4362

  
......
4423 4410
                        }
4424 4411
                        gridViewRevMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoRevList;
4425 4412

  
4426
                        string uri = "";
4427
                        if (userData.COMPANY != "EXT")
4428
                        {
4429
                            uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4430
                        }
4431
                        else
4432
                        {
4433
                            uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4434
                        }
4413
                        string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4435 4414

  
4436 4415
                        Sync_Offset_Point = new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY);
4437 4416

  
......
4527 4506
                    }
4528 4507
                    gridViewRevMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoRevList;
4529 4508

  
4530
                    string uri = "";
4531
                    if (userData.COMPANY != "EXT")
4532
                    {
4533
                        uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4534
                    }
4535
                    else
4536
                    {
4537
                        uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4538
                    }
4509
                    string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
4539 4510

  
4540 4511
                    Sync_Offset_Point = new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY);
4541 4512

  

내보내기 Unified diff

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