개정판 d7e20d2d
markus 성능개선
- 일정 페이지범위를 local 저장소에 저장
Change-Id: Ib6ef3d770a360c40acf01d6de04668bee653eee4
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
438 | 438 |
/// <param name="e"></param> |
439 | 439 |
public void DeleteCommentEvent(object sender, RoutedEventArgs e) |
440 | 440 |
{ |
441 |
//정말 삭제 하시겠습니까? |
|
441 | 442 |
DialogParameters parameters = new DialogParameters() |
442 | 443 |
{ |
443 | 444 |
Owner = Application.Current.MainWindow, |
... | ... | |
445 | 446 |
{ |
446 | 447 |
MinWidth = 400, |
447 | 448 |
FontSize = 11, |
448 |
Text = "정말 삭제 하시겠습니까?",
|
|
449 |
Text = "Are you sure you want to delete?",
|
|
449 | 450 |
TextWrapping = System.Windows.TextWrapping.Wrap |
450 | 451 |
}, |
451 | 452 |
Header = "Confirm", |
... | ... | |
638 | 639 |
/// <param name="e"></param> |
639 | 640 |
private async void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e) |
640 | 641 |
{ |
642 |
await Task.Delay(300); |
|
643 |
|
|
644 |
await this.Dispatcher.InvokeAsync(()=>MarkupLoad(e.PageNumber)); |
|
645 |
|
|
646 |
await PageChangingAsync(e.CurrentPage, e.PageNumber); |
|
647 |
} |
|
648 |
|
|
649 |
private async Task PageChangingAsync(DOCPAGE currentPage, int changePageNumber) |
|
650 |
{ |
|
641 | 651 |
CompareMode.IsChecked = false; |
642 |
var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? e.PageNumber + ViewerDataModel.Instance.PageBalanceNumber : e.PageNumber;
|
|
652 |
var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? changePageNumber + ViewerDataModel.Instance.PageBalanceNumber : changePageNumber;
|
|
643 | 653 |
|
644 | 654 |
#region 페이지가 벗어난 경우 |
645 | 655 |
|
... | ... | |
659 | 669 |
|
660 | 670 |
ViewerDataModel.Instance.PageNumber = BalancePoint; |
661 | 671 |
|
662 |
var pageWidth = Convert.ToDouble(e.CurrentPage.PAGE_WIDTH);
|
|
663 |
var pageHeight = Convert.ToDouble(e.CurrentPage.PAGE_HEIGHT);
|
|
672 |
var pageWidth = Convert.ToDouble(currentPage.PAGE_WIDTH);
|
|
673 |
var pageHeight = Convert.ToDouble(currentPage.PAGE_HEIGHT);
|
|
664 | 674 |
var pageUri = pageNavigator.CurrentPage.PageUri; |
665 | 675 |
var contentScale = zoomAndPanControl.ContentScale; |
666 | 676 |
|
667 | 677 |
#region 페이지 이미지 로딩 수정 |
668 | 678 |
|
669 |
// ViewerDataModel.Instance.ImageViewPath = await ImageSourceHelper.GetDownloadImageAsync(pageUri, pageWidth * contentScale, pageHeight * contentScale); |
|
670 |
try |
|
671 |
{ |
|
672 |
System.Diagnostics.Debug.WriteLine(pageUri); |
|
673 |
ViewerDataModel.Instance.ImageViewPath = null; |
|
674 |
|
|
675 |
new System.Net.Http.HttpClient().CancelPendingRequests(); |
|
676 |
//await Task.Delay(300); |
|
677 |
|
|
678 |
ViewerDataModel.Instance.ImageViewPath = await ImageSourceHelper.GetDownloadImageAsync(pageUri, pageWidth, pageHeight); |
|
679 |
} |
|
680 |
catch (Exception ex) |
|
681 |
{ |
|
682 |
ViewerDataModel.Instance.ImageViewPath = null; |
|
683 |
string imgfailedmsg = string.Format(CommonLib.Common.GetAlertMessageString("GetImageResourceFailed", "MSG", "해당 문서의 {0} Page Convert가 정상적이지 않습니다. 관리자에게 문의해 주세요."), pageNavigator.CurrentPage.PageNumber); |
|
684 |
DialogMessage_Alert(imgfailedmsg, "Warning"); |
|
685 |
App.FileLogger.Fatal(ex); |
|
686 |
} |
|
679 |
ViewerDataModel.Instance.ImageViewPath = await App.PageStorage.GetPageAsync(pageNavigator.CurrentPage.PageNumber); |
|
680 |
|
|
687 | 681 |
ScaleImage(pageWidth, pageHeight); |
688 | 682 |
|
689 | 683 |
ViewerDataModel.Instance.ImageViewWidth = pageWidth; |
... | ... | |
791 | 785 |
|
792 | 786 |
SearchFocusBorder.Visibility = Visibility.Collapsed; |
793 | 787 |
|
794 |
this.pageNavigator.ChangePage(e.PageNumber);
|
|
788 |
this.pageNavigator.ChangePage(changePageNumber);
|
|
795 | 789 |
} |
796 | 790 |
|
797 | 791 |
/// <summary> |
... | ... | |
803 | 797 |
{ |
804 | 798 |
//if (zoomAndPanCanvas.Width.IsNaN()) |
805 | 799 |
//{ |
806 |
|
|
807 |
await zoomAndPanControl.Dispatcher.InvokeAsync(()=> |
|
800 |
|
|
801 |
await zoomAndPanControl.Dispatcher.InvokeAsync(() =>
|
|
808 | 802 |
zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height }) |
809 | 803 |
); |
810 | 804 |
//} |
811 | 805 |
|
806 |
|
|
807 |
var instanceMain = ViewerDataModel.Instance.SystemMain; |
|
808 |
|
|
809 |
instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString(); |
|
810 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString(); |
|
811 |
|
|
812 |
instanceMain.dzTopMenu.rotateOffSet = 0; |
|
813 |
var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault(); |
|
814 |
drawingPannelRotate(pageinfo.PAGE_ANGLE); |
|
815 |
|
|
816 |
/// 페이지의 모든 마크업을 로드한 후 호출 |
|
817 |
/// 좌측 마크업 list의 아이템을 클릭하는 경우 MarkupControls_USER가 0으로 나와서 추가함. |
|
818 |
ViewerDataModel.Instance.LoadPageMarkup(); |
|
819 |
} |
|
820 |
|
|
821 |
private void MarkupLoad(int pageNumber) |
|
822 |
{ |
|
812 | 823 |
/// 컨트롤을 새로 생성한다. |
813 | 824 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Clear(); //전체 제거 |
814 | 825 |
Common.ViewerDataModel.Instance.MarkupControls.Clear(); //전체 제거 |
815 |
foreach (var markup in ViewerDataModel.Instance.MyMarkupList.Where(param => param.PageNumber == ViewerDataModel.Instance.PageNumber))
|
|
826 |
foreach (var markup in ViewerDataModel.Instance.MyMarkupList.Where(param => param.PageNumber == pageNumber))
|
|
816 | 827 |
{ |
817 | 828 |
var info = ViewerDataModel.Instance._markupInfoList.Where(param => param.MarkupInfoID == markup.MarkupInfoID).FirstOrDefault(); |
818 | 829 |
if (info != null) |
... | ... | |
851 | 862 |
|
852 | 863 |
foreach (var item in gridSelectionRevItem) |
853 | 864 |
{ |
854 |
item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
|
|
865 |
item.MarkupList.Where(pageItem => pageItem.PageNumber == pageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
|
|
855 | 866 |
{ |
856 | 867 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID); |
857 | 868 |
}); |
858 | 869 |
} |
859 | 870 |
} |
860 |
|
|
861 |
var instanceMain = this.ParentOfType<MainWindow>(); |
|
862 |
instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString(); |
|
863 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString(); |
|
864 |
|
|
865 |
instanceMain.dzTopMenu.rotateOffSet = 0; |
|
866 |
var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault(); |
|
867 |
drawingPannelRotate(pageinfo.PAGE_ANGLE); |
|
868 | 871 |
|
869 | 872 |
SetCommentPages(); |
870 | 873 |
|
871 |
/// 페이지의 모든 마크업을 로드한 후 호출 |
|
872 |
/// 좌측 마크업 list의 아이템을 클릭하는 경우 MarkupControls_USER가 0으로 나와서 추가함. |
|
873 |
ViewerDataModel.Instance.LoadPageMarkup(); |
|
874 | 874 |
} |
875 | 875 |
|
876 | 876 |
public void SetCommentPages() |
... | ... | |
2355 | 2355 |
} |
2356 | 2356 |
} |
2357 | 2357 |
|
2358 |
private void zoomAndPanControl_MouseDown(object sender, MouseButtonEventArgs e) |
|
2358 |
private async void zoomAndPanControl_MouseDown(object sender, MouseButtonEventArgs e)
|
|
2359 | 2359 |
{ |
2360 | 2360 |
var set_option = this.ParentOfType<MainWindow>().dzTopMenu.Parent.ChildrenOfType<RadNumericUpDown>().Where(item => item.IsKeyboardFocusWithin).FirstOrDefault(); |
2361 | 2361 |
if (set_option != null && !string.IsNullOrEmpty(set_option.ContentText)) |
... | ... | |
2662 | 2662 |
} |
2663 | 2663 |
if (init_user && gridViewMarkup.SelectedItems.Where(d => (d as MarkupInfoItem).UserID == App.ViewInfo.UserID).FirstOrDefault() == null && e.LeftButton == MouseButtonState.Pressed) |
2664 | 2664 |
{ |
2665 |
// 기존의 코멘트가 존재합니다. 사용자 리스트에서 먼저 선택해주세요 |
|
2665 | 2666 |
RadWindow.Alert(new DialogParameters |
2666 | 2667 |
{ |
2667 | 2668 |
Owner = Application.Current.MainWindow, |
2668 | 2669 |
Theme = new VisualStudio2013Theme(), |
2669 |
Header = "안내",
|
|
2670 |
Content = "기존의 코멘트가 존재합니다. 사용자 리스트에서 먼저 선택해주세요",
|
|
2670 |
Header = "Info",
|
|
2671 |
Content = "Existing comments already existed. Select from the user list first",
|
|
2671 | 2672 |
}); |
2672 | 2673 |
return; |
2673 | 2674 |
} |
... | ... | |
3861 | 3862 |
{ |
3862 | 3863 |
//if (IsDrawingEnable(canvasZoomPanningMouseDownPoint)) |
3863 | 3864 |
//{ |
3864 |
var _sign = GetUserSign.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO,App.isExternal);
|
|
3865 |
var _sign = await BaseTaskClient.GetSignDataAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID);
|
|
3865 | 3866 |
|
3866 |
if (_sign == null)
|
|
3867 |
if (_sign == null) |
|
3867 | 3868 |
{ |
3868 | 3869 |
txtBatch.Visibility = Visibility.Collapsed; |
3869 | 3870 |
mouseHandlingMode = IKCOM.MouseHandlingMode.None; |
내보내기 Unified diff