프로젝트

일반

사용자정보

개정판 fc5ed14c

IDfc5ed14ccff4ec26e49cef9d3d7ec670f8c7848d
상위 079a438a
하위 5912549a

김태성이(가) 4달 전에 추가함

issue #0000 compar기능을 client에서 하도록 수정

Change-Id: I5654925814de0f9fbace8b8f0a224f878dc4f258

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
743 743

  
744 744
            #endregion 페이지가 벗어난 경우
745 745

  
746

  
747
            if (pageNavigator.PageCount < BalancePoint)
748
            {
749
                BalancePoint = pageNavigator.PageCount;
750
                ViewerDataModel.Instance.PageBalanceNumber = 0;
751
            }
752

  
753
            if (ViewerDataModel.Instance.SyncPageCount < BalancePoint)
754
            {
755
                BalancePoint = ViewerDataModel.Instance.SyncPageCount;
756
            }
757

  
746 758
            ViewerDataModel.Instance.SyncPageNumber = BalancePoint;
747 759

  
748 760
            var pageWidth = Convert.ToDouble(currentPage.PAGE_WIDTH);
......
811 823
                else
812 824
                {
813 825
                    Logger.sendCheckLog("Compare Image Download", 1);
814
                    string compareImageUri = this.GetImageURL(CurrentRev.DOCUMENT_ID, BalancePoint);
815
                    ComparePageLoad(compareImageUri,false);
826
   
827
                    ComparePageLoad(CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.SyncPageNumber, false);
816 828
                }
817

  
818
                tlSyncPageNum.Text = String.Format("Current Page : {0}", BalancePoint);
819 829
            }
820 830

  
821 831
            SearchFocusBorder.Visibility = Visibility.Collapsed;
......
823 833
            this.pageNavigator.ChangePage(changePageNumber);
824 834
        }
825 835

  
826
        private void ComparePageLoad(string pageUri, bool IsOriginalSize)
836
        private void ComparePageLoad(string documentID,int PageNo, bool IsOriginalSize)
827 837
        {
838
            if (PageNo > ViewerDataModel.Instance.SyncPageCount)
839
            {
840
                return;
841
            }
842

  
843
            tlSyncPageNum.Text = String.Format($"Current Page : {ViewerDataModel.Instance.SyncPageNumber}/{ViewerDataModel.Instance.SyncPageCount}");
844

  
845
            string pageUri = this.GetImageURL(documentID, ViewerDataModel.Instance.SyncPageNumber);
846

  
828 847
            /// 현재 보고 있는 VP와 같은 크기로 로딩
829 848
            ViewerDataModel.Instance.ImageViewPath_C = null;
830 849

  
......
5172 5191
                    ViewerDataModel.Instance.PageBalanceNumber += balancePoint;
5173 5192
                }
5174 5193

  
5175
                if (ViewerDataModel.Instance.SyncPageNumber == pageNavigator.PageCount && balancePoint > 0)
5176
                {
5177
                }
5178
                else if ((ViewerDataModel.Instance.SyncPageNumber + balancePoint) >= 1)
5194
                if ((ViewerDataModel.Instance.SyncPageNumber + balancePoint) >= 1 
5195
                    && ViewerDataModel.Instance.SyncPageNumber + balancePoint  <= ViewerDataModel.Instance.SyncPageCount)
5179 5196
                {
5180 5197
                    ViewerDataModel.Instance.SyncPageNumber += balancePoint;
5181 5198
                }
......
5212 5229
                    }
5213 5230
                    else
5214 5231
                    {
5215
                        string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.SyncPageNumber);
5216

  
5217 5232
                        var isOriginalSize = !(ViewerDataModel.Instance.SyncPageNumber == pageNavigator.CurrentPage.PageNumber);
5218
                        ComparePageLoad(uri, isOriginalSize);
5233

  
5234
                        ComparePageLoad(CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.SyncPageNumber, isOriginalSize);
5219 5235
                    }
5220 5236
                   
5221 5237
                    //강인구 추가(페이지 이동시 코멘트 재 호출)
......
5232 5248
                        }
5233 5249
                    }
5234 5250

  
5235
                    tlSyncPageNum.Text = String.Format("Current Page : {0}", ViewerDataModel.Instance.SyncPageNumber);
5236 5251
                }
5237 5252
            }
5238 5253
        }
......
5344 5359
            else
5345 5360
            {
5346 5361
                IsSyncPDFMode = false;
5347
                string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
5348

  
5349
                ComparePageLoad(uri,false);
5362
                ComparePageLoad(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber, false);
5350 5363

  
5351 5364
                zoomAndPanControl2.ApplyTemplate();
5352 5365
                zoomAndPanControl2.UpdateLayout();
......
5454 5467
            canvas_compareBorder.BeginAnimation(OpacityProperty, da);
5455 5468
        }
5456 5469

  
5457
        private void btnSync_Click(object sender, RoutedEventArgs e)
5470
        private async void btnSync_Click(object sender, RoutedEventArgs e)
5458 5471
        {
5459 5472
            gridViewHistory_Busy.IsBusy = true;
5460 5473

  
......
5462 5475
            if (instance.CommandParameter != null)
5463 5476
            {
5464 5477
                CurrentRev = instance.CommandParameter as VPRevision;
5478

  
5479
                var pageinfo = await BaseTaskClient.GetDocInfoAsync(new KCOM_BasicParam {projectNo = _ViewInfo.ProjectNO,documentID = CurrentRev.DOCUMENT_ID });
5480

  
5481
                if (pageinfo != null)
5482
                {
5483
                    ViewerDataModel.Instance.SyncPageCount = pageinfo.PAGE_COUNT;
5484
                }
5485
                else
5486
                {
5487
                    ViewerDataModel.Instance.SyncPageCount = -1;
5488
                }
5489

  
5465 5490
                System.EventHandler<ServiceDeepView.GetSyncMarkupInfoItemsCompletedEventArgs> GetSyncMarkupInfoItemshandler = null;
5466 5491

  
5467 5492
                GetSyncMarkupInfoItemshandler = (sen, ea) =>
......
5486 5511
                        }
5487 5512
                        gridViewRevMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoRevList;
5488 5513

  
5489
                        string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
5490
                        ComparePageLoad(uri,false);
5514
                        ComparePageLoad(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber, false);
5491 5515

  
5492 5516
                        Sync_Offset_Point = new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY);
5493 5517

  
......
5505 5529
                        ViewerDataModel.Instance.Sync_ContentScale = zoomAndPanControl.ContentScale;
5506 5530

  
5507 5531
                        tlSyncRev.Text = String.Format("Rev. {0}", CurrentRev.RevNo);
5508
                        tlSyncPageNum.Text = String.Format("Current Page : {0}", pageNavigator.CurrentPage.PageNumber);
5509 5532

  
5510 5533
                        zoomAndPanControl.ScaleToFit();
5511 5534
                        zoomAndPanControl2.ScaleToFit();
......
5534 5557

  
5535 5558
        private void OriginalSizeMode_Click(object sender,RoutedEventArgs e)
5536 5559
        {
5537
            string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.SyncPageNumber);
5538 5560
            var isOriginalSize = !(ViewerDataModel.Instance.SyncPageNumber == pageNavigator.CurrentPage.PageNumber);
5539 5561

  
5540 5562
            canvas_compareBorder.Visibility = Visibility.Hidden;
5541 5563
            ClearCompareRect();
5542 5564

  
5543
            ComparePageLoad(uri, OriginalSizeMode.IsChecked);
5565
            ComparePageLoad(CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.SyncPageNumber, OriginalSizeMode.IsChecked);
5544 5566
        }
5545 5567

  
5546 5568
        private void EnsembleLink_Button_Click(object sender, RoutedEventArgs e)
......
5592 5614
                    }
5593 5615
                    gridViewRevMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoRevList;
5594 5616

  
5595
                    string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
5596

  
5597 5617
                    Sync_Offset_Point = new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY);
5598 5618

  
5599
                    ComparePageLoad(uri,false);
5619
                    ComparePageLoad(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber, false);
5600 5620

  
5601 5621
                    zoomAndPanCanvas2.Width = Convert.ToDouble(Common.ViewerDataModel.Instance.ContentWidth);
5602 5622
                    zoomAndPanCanvas2.Height = Convert.ToDouble(Common.ViewerDataModel.Instance.ContentHeight);
......
5611 5631
                    //}
5612 5632
                    
5613 5633
                    tlSyncRev.Text = String.Format("Rev. {0}", CurrentRev.RevNo);
5614
                    tlSyncPageNum.Text = String.Format("Current Page : {0}", pageNavigator.CurrentPage.PageNumber);
5634
            
5615 5635
                    gridViewHistory_Busy.IsBusy = false;
5616 5636
                }
5617 5637
                //Logger.sendResLog("GetSyncMarkupInfoItemsCompleted", "UserState : " + ea.UserState + "\r Result :" + ea.Result + "\r Cancelled :" + ea.Cancelled + "\r Error :" + ea.Error, 1);

내보내기 Unified diff

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