프로젝트

일반

사용자정보

개정판 69f41aab

ID69f41aab39e8801f951461c3b5682c82277ba98d
상위 b79f786f
하위 f3b312d2, 0c368b45

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

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

Change-Id: I2d13cc6156627af2e00b9557939973a7d94d04d2

차이점 보기:

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)