개정판 548c696e
issue #000 page 이동 시 속도 체크를 위해 log 추가
Change-Id: Ie1af198c155edc20b898e005846314ec9f955d09
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
93 | 93 |
|
94 | 94 |
public void SetPageNavi(List<DOCPAGE> PageList, string DefaultUri) |
95 | 95 |
{ |
96 |
Logger.sendCheckLog("SetPageNavi", 1); |
|
96 | 97 |
this._PageList = PageList; |
97 | 98 |
this._DefaultUri = DefaultUri; |
98 | 99 |
ThumbnailSet(); |
... | ... | |
105 | 106 |
} |
106 | 107 |
void rdoCommented_Checked(object sender, RoutedEventArgs e) |
107 | 108 |
{ |
109 |
Logger.sendCheckLog("rdoCommented_Checked", 1); |
|
108 | 110 |
if (rdoAllPages.IsChecked == true) expCommentPages.IsExpanded = false; |
109 | 111 |
SetCommentPages(); |
110 | 112 |
} |
111 | 113 |
|
112 | 114 |
void rdoFavoritePages_Checked(object sender, RoutedEventArgs e) |
113 | 115 |
{ |
116 |
Logger.sendCheckLog("rdoFavoritePages_Checked", 1); |
|
114 | 117 |
if (rdoFavoritePages.IsChecked == true) |
115 | 118 |
expCommentPages.IsExpanded = false; |
116 | 119 |
|
... | ... | |
128 | 131 |
|
129 | 132 |
private void SetCommentPages_Favorite() |
130 | 133 |
{ |
134 |
Logger.sendCheckLog("SetCommentPages_Favorite", 1); |
|
131 | 135 |
ThumbnailSet(); |
132 | 136 |
//_UsersCommentPagesList |
133 | 137 |
//var result = (from A in _UsersCommentPagesList |
... | ... | |
147 | 151 |
|
148 | 152 |
void expCommentPages_PreviewExpanded(object sender, Telerik.Windows.RadRoutedEventArgs e) |
149 | 153 |
{ |
154 |
Logger.sendCheckLog("expCommentPages_PreviewExpanded", 1); |
|
150 | 155 |
rdoAllPages.IsChecked = false; |
151 | 156 |
rdoFavoritePages.IsChecked = false; |
152 | 157 |
//txtThumbCount.Visibility = Visibility.Visible; |
... | ... | |
155 | 160 |
|
156 | 161 |
private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
157 | 162 |
{ |
163 |
Logger.sendCheckLog("ImgListbox_SelectionChanged", 1); |
|
158 | 164 |
if (ImgListbox.SelectedItem != null) |
159 | 165 |
{ |
160 | 166 |
int _PageNo = -1; |
... | ... | |
200 | 206 |
|
201 | 207 |
public void setPageChange(ThumbnailItem thumbnailItem) |
202 | 208 |
{ |
209 |
Logger.sendCheckLog("setPageChange", 1); |
|
203 | 210 |
if (thumbnailItem != null) |
204 | 211 |
{ |
205 | 212 |
if (PageChanging != null) |
... | ... | |
360 | 367 |
} |
361 | 368 |
|
362 | 369 |
public void SetNextPage() |
363 |
{ |
|
370 |
{ |
|
371 |
Logger.sendCheckLog("pageNavigator_PageChanging_SetNextPage", 1); |
|
364 | 372 |
CurrentPage = _NextPage; |
365 | 373 |
PageChange(_NextPage); |
366 | 374 |
} |
367 | 375 |
|
368 | 376 |
private void PageChange(ThumbnailItem thumbitem) |
369 | 377 |
{ |
378 |
Logger.sendCheckLog("pageNavigator_PageChanging_PageChange", 1); |
|
370 | 379 |
if (PageChanged != null) |
371 | 380 |
{ |
372 | 381 |
var uri = _DefaultUri.Replace("{PageNo}", thumbitem.PageNumber.ToString()); |
... | ... | |
419 | 428 |
} |
420 | 429 |
public void SetCommentPages() |
421 | 430 |
{ |
431 |
Logger.sendCheckLog("SetCommentPages", 1); |
|
422 | 432 |
ThumbnailSet(); |
423 | 433 |
SetCommentList(_UsersCommentPagesList.ToList()); |
424 | 434 |
} |
425 | 435 |
|
426 | 436 |
public void SetCommentList(List<UsersCommentPagesMember> UsersCommentPagesList) |
427 | 437 |
{ |
438 |
Logger.sendCheckLog("SetCommentList", 1); |
|
428 | 439 |
#region 기존 색상 제거 작업 |
429 | 440 |
foreach (var item in this._thumbnailItems) |
430 | 441 |
{ |
... | ... | |
504 | 515 |
|
505 | 516 |
private void ThumbnailSet() |
506 | 517 |
{ |
518 |
Logger.sendCheckLog("ThumbnailSet", 1); |
|
507 | 519 |
if (!_Initialize) return; |
508 | 520 |
|
509 | 521 |
this._thumbnailItems = new ObservableCollection<ThumbnailItem>(); |
KCOM/Logger.cs | ||
---|---|---|
65 | 65 |
Debug.WriteLine(e); |
66 | 66 |
} |
67 | 67 |
} |
68 |
|
|
69 |
public static void sendCheckLog(string text, int Loglevel) |
|
70 |
{ |
|
71 |
try |
|
72 |
{ |
|
73 |
int lv = global::KCOM.Properties.Settings.Default.loglevel; |
|
74 |
if (lv >= Loglevel) //세팅의 로그 레벨보다 낮거나 같으면 남김 |
|
75 |
{ |
|
76 |
// string Msg = (string)text + " / " + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "\r\n"; |
|
77 |
string Msg = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "\t" + "RES" + "\t" + text + "\r\n"; |
|
78 |
string Dir = "C:\\ProgramData\\MARKUS\\" + "Check"; |
|
79 |
|
|
80 |
if (Directory.Exists(Dir) == false) |
|
81 |
{ |
|
82 |
Directory.CreateDirectory(Dir); |
|
83 |
} |
|
84 |
|
|
85 |
int min = DateTime.Now.Minute / 1; |
|
86 |
|
|
87 |
string path = Dir + "/" + "Log_" + DateTime.Now.ToString("yyyy-MM-dd HH-") + min + ".txt"; |
|
88 |
File.AppendAllText(path, Msg); |
|
89 |
} |
|
90 |
} |
|
91 |
catch (Exception e) |
|
92 |
{ |
|
93 |
Debug.WriteLine(e); |
|
94 |
} |
|
95 |
} |
|
68 | 96 |
} |
69 | 97 |
} |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
566 | 566 |
|
567 | 567 |
public void ReleaseAdorner() |
568 | 568 |
{ |
569 |
Logger.sendCheckLog("pageNavigator_PageChanging_ReleaseAdorner", 1); |
|
569 | 570 |
if (SelectLayer.Children.Count > 0) |
570 | 571 |
{ |
571 | 572 |
foreach (var item in SelectLayer.Children) |
... | ... | |
628 | 629 |
|
629 | 630 |
public void ChangeCommentReact() |
630 | 631 |
{ |
632 |
Logger.sendCheckLog("pageNavigator_PageChanging_ChangeCommentReact", 1); |
|
631 | 633 |
bool isComingNewBie = false; |
632 | 634 |
|
633 | 635 |
if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0) |
... | ... | |
695 | 697 |
bool ComingNewBieEnd = false; |
696 | 698 |
|
697 | 699 |
private void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e) |
698 |
{ |
|
700 |
{ |
|
701 |
Logger.sendCheckLog("pageNavigator_PageChanging_Start", 1); |
|
699 | 702 |
if (ViewerDataModel.Instance.UndoDataList.Count > 0) |
700 |
{ |
|
703 |
{ |
|
704 |
Logger.sendCheckLog("pageNavigator_PageChanging_이전페이지Save", 1); |
|
701 | 705 |
this.ParentOfType<MainWindow>().dzTopMenu.SaveEvent(null, null); |
702 | 706 |
} |
703 |
|
|
707 |
Logger.sendCheckLog("pageNavigator_PageChanging_UndoDataListClear", 1); |
|
704 | 708 |
ViewerDataModel.Instance.UndoDataList.Clear(); |
705 | 709 |
|
706 | 710 |
InkControl_Convert(); |
707 | 711 |
|
708 | 712 |
ReleaseAdorner(); |
709 | 713 |
ChangeCommentReact(); |
714 |
|
|
715 |
Logger.sendCheckLog("pageNavigator_PageChanging_변수생성 및 값 설정", 1); |
|
710 | 716 |
CompareMode.IsChecked = false; |
711 | 717 |
var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? e.PageNumber + ViewerDataModel.Instance.PageBalanceNumber : e.PageNumber; |
712 | 718 |
|
... | ... | |
729 | 735 |
|
730 | 736 |
ViewerDataModel.Instance.PageNumber = BalancePoint; |
731 | 737 |
|
738 |
Logger.sendCheckLog("pageNavigator_PageChanging_페이지 Image url 설정", 1); |
|
732 | 739 |
string uri = ""; |
733 | 740 |
if (userData.COMPANY != "EXT") |
734 | 741 |
{ |
... | ... | |
738 | 745 |
{ |
739 | 746 |
uri = String.Format(Properties.Settings.Default.subServerImageWebPath, _ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, e.PageNumber); |
740 | 747 |
} |
741 |
|
|
748 |
|
|
742 | 749 |
var defaultBitmapImage = new BitmapImage(); |
743 | 750 |
defaultBitmapImage.BeginInit(); |
744 | 751 |
defaultBitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache; |
... | ... | |
747 | 754 |
defaultBitmapImage.EndInit(); |
748 | 755 |
|
749 | 756 |
ViewerDataModel.Instance.ImageViewPath = null; |
750 |
GC.Collect(); |
|
757 |
Logger.sendCheckLog("pageNavigator_PageChanging_GC.Collect()", 1); |
|
758 |
GC.Collect(); |
|
751 | 759 |
|
760 |
|
|
761 |
Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage Downloading", 1); |
|
752 | 762 |
if (defaultBitmapImage.IsDownloading) |
753 | 763 |
{ |
754 | 764 |
defaultBitmapImage.DownloadCompleted += (ex, arg) => |
755 | 765 |
{ |
766 |
Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage DownloadCompleted", 1); |
|
756 | 767 |
defaultBitmapImage.Freeze(); |
757 | 768 |
mainPanel.UpdateLayout(); |
758 | 769 |
GC.Collect(); |
... | ... | |
762 | 773 |
}; |
763 | 774 |
} |
764 | 775 |
|
776 |
Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanCanvas Page Setting", 1); |
|
765 | 777 |
zoomAndPanCanvas.Width = Convert.ToDouble(e.CurrentPage.PAGE_WIDTH); |
766 | 778 |
zoomAndPanCanvas.Height = Convert.ToDouble(e.CurrentPage.PAGE_HEIGHT); |
767 | 779 |
|
... | ... | |
775 | 787 |
|
776 | 788 |
if (!testPanel2.IsHidden) |
777 | 789 |
{ |
790 |
Logger.sendCheckLog("pageNavigator_PageChanging_!testPanel2.IsHidden 일 때", 1); |
|
778 | 791 |
//PDF모드일때 잠시 대기(강인구) |
779 | 792 |
if (IsSyncPDFMode) |
780 | 793 |
{ |
781 | 794 |
Get_FinalImage.Get_PdfImage get_PdfImage = new Get_FinalImage.Get_PdfImage(); |
782 | 795 |
var pdfpath = new BitmapImage(new Uri(get_PdfImage.Run(CurrentRev.TO_VENDOR, App.ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.PageNumber))); |
783 | 796 |
|
797 |
Logger.sendCheckLog("pageNavigator_PageChanging_pdfpath Image Downloading", 1); |
|
784 | 798 |
if (pdfpath.IsDownloading) |
785 | 799 |
{ |
786 | 800 |
pdfpath.DownloadCompleted += (ex, arg) => |
787 | 801 |
{ |
802 |
Logger.sendCheckLog("pageNavigator_PageChanging_pdfpath Image DownloadCompleted", 1); |
|
788 | 803 |
ViewerDataModel.Instance.ImageViewPath_C = pdfpath; |
789 | 804 |
ViewerDataModel.Instance.ImageViewWidth_C = pdfpath.PixelWidth; |
790 | 805 |
ViewerDataModel.Instance.ImageViewHeight_C = pdfpath.PixelHeight; |
... | ... | |
794 | 809 |
} |
795 | 810 |
else |
796 | 811 |
{ |
812 |
Logger.sendCheckLog("pageNavigator_PageChanging_pdfpath Image Page Setting", 1); |
|
797 | 813 |
ViewerDataModel.Instance.ImageViewPath_C = pdfpath; |
798 | 814 |
ViewerDataModel.Instance.ImageViewWidth_C = pdfpath.PixelWidth; |
799 | 815 |
ViewerDataModel.Instance.ImageViewHeight_C = pdfpath.PixelHeight; |
... | ... | |
804 | 820 |
} |
805 | 821 |
else |
806 | 822 |
{ |
823 |
Logger.sendCheckLog("pageNavigator_PageChanging_uri2 값 설정", 1); |
|
807 | 824 |
string uri2 = ""; |
808 | 825 |
if (userData.COMPANY != "EXT") |
809 | 826 |
{ |
... | ... | |
814 | 831 |
uri2 = String.Format(Properties.Settings.Default.subServerImageWebPath, _ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, BalancePoint); |
815 | 832 |
} |
816 | 833 |
|
817 |
|
|
834 |
Logger.sendCheckLog("pageNavigator_PageChanging_defaultBitmapImage_Compare BitmapImage 설정", 1); |
|
818 | 835 |
var defaultBitmapImage_Compare = new BitmapImage(new Uri(uri2)); |
819 | 836 |
|
837 |
Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanCanvas2 Page Setting", 1); |
|
820 | 838 |
ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare; |
821 | 839 |
ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth; |
822 | 840 |
ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight; |
823 | 841 |
zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth; |
824 | 842 |
zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight; |
825 | 843 |
|
844 |
Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanControl ZoomTo 설정", 1); |
|
826 | 845 |
zoomAndPanControl.ZoomTo(new Rect |
827 | 846 |
{ |
828 | 847 |
X = 0, |
... | ... | |
831 | 850 |
Height = Math.Max(zoomAndPanCanvas.Height, zoomAndPanCanvas2.Height), |
832 | 851 |
}); |
833 | 852 |
|
853 |
Logger.sendCheckLog("pageNavigator_PageChanging_defaultBitmapImage_Compare Downloading", 1); |
|
834 | 854 |
if (defaultBitmapImage_Compare.IsDownloading) |
835 | 855 |
{ |
836 | 856 |
defaultBitmapImage_Compare.DownloadCompleted += (ex, arg) => |
837 | 857 |
{ |
838 |
|
|
858 |
Logger.sendCheckLog("pageNavigator_PageChanging_defaultBitmapImage_Compare DownloadCompleted", 1); |
|
839 | 859 |
ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare; |
840 | 860 |
ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth; |
841 | 861 |
ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight; |
842 |
|
|
862 |
|
|
843 | 863 |
zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth; |
844 | 864 |
zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight; |
845 | 865 |
|
... | ... | |
862 | 882 |
{ |
863 | 883 |
zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height }); |
864 | 884 |
} |
865 |
|
|
885 |
Logger.sendCheckLog("pageNavigator_PageChanging_ControlData Setting", 1); |
|
866 | 886 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Clear(); //전체 제거 |
867 | 887 |
Common.ViewerDataModel.Instance.MarkupControls.Clear(); //전체 제거 |
868 | 888 |
|
... | ... | |
1002 | 1022 |
|
1003 | 1023 |
private void SetCommentPages(bool onlyMe = false) |
1004 | 1024 |
{ |
1005 |
|
|
1025 |
Logger.sendCheckLog("pageNavigator_PageChanging_SetCommentPages Setting", 1); |
|
1006 | 1026 |
List<UsersCommentPagesMember> _pages = new List<UsersCommentPagesMember>(); |
1007 | 1027 |
foreach (var item in ViewerDataModel.Instance._markupInfoList) |
1008 | 1028 |
{ |
... | ... | |
3329 | 3349 |
|
3330 | 3350 |
private void drawingPannelRotate(double angle) |
3331 | 3351 |
{ |
3352 |
Logger.sendCheckLog("pageNavigator_PageChanging_drawingPannelRotate Setting", 1); |
|
3332 | 3353 |
rotate.Angle = angle; |
3333 | 3354 |
var rotationNum = Math.Abs((rotate.Angle / 90)); |
3334 | 3355 |
|
... | ... | |
7035 | 7056 |
} |
7036 | 7057 |
public void InkControl_Convert() |
7037 | 7058 |
{ |
7059 |
Logger.sendCheckLog("pageNavigator_PageChanging_InkControl_Convert", 1); |
|
7038 | 7060 |
if (inkBoard.Strokes.Count > 0) |
7039 | 7061 |
{ |
7040 | 7062 |
inkBoard.Strokes.ToList().ForEach(stroke => |
내보내기 Unified diff