markus / KCOM / Controls / Sample.xaml.cs @ 129ca191
이력 | 보기 | 이력해설 | 다운로드 (43.5 KB)
1 |
using IKCOM; |
---|---|
2 |
using KCOM.Common; |
3 |
using KCOMDataModel.DataModel; |
4 |
using MarkupToPDF.Controls.Parsing; |
5 |
using System; |
6 |
using System.Collections.Generic; |
7 |
using System.Collections.ObjectModel; |
8 |
using System.ComponentModel; |
9 |
using System.Diagnostics; |
10 |
using System.Linq; |
11 |
using System.Windows; |
12 |
using System.Windows.Controls; |
13 |
using System.Windows.Input; |
14 |
using System.Windows.Media; |
15 |
using Telerik.Windows.Controls; |
16 |
|
17 |
namespace KCOM.Controls |
18 |
{ |
19 |
/// <summary> |
20 |
/// Interaction logic for PageNavigator.xaml |
21 |
/// </summary> |
22 |
public partial class Sample : UserControl, INotifyPropertyChanged |
23 |
{ |
24 |
public List<FAVORITE_DOC> _FavoriteSet { get; set; } |
25 |
public event PropertyChangedEventHandler PropertyChanged; |
26 |
public Sample() |
27 |
{ |
28 |
//InitializeComponent(); |
29 |
App.splashString(ISplashMessage.SAMPLE); |
30 |
this.Loaded += Sample_Loaded; |
31 |
//_Initialize = true; |
32 |
|
33 |
//lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged); |
34 |
//ImgListbox.MouseDoubleClick += ImgListbox_MouseDoubleClick; |
35 |
} |
36 |
|
37 |
private void Sample_Loaded(object sender, RoutedEventArgs e) |
38 |
{ |
39 |
if(!_Initialize) |
40 |
{ |
41 |
InitializeComponent(); |
42 |
//System.Diagnostics.Debug.WriteLine("Sample() : " + sw.ElapsedMilliseconds.ToString() + "ms"); |
43 |
|
44 |
_Initialize = true; |
45 |
this.lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged); |
46 |
this.ImgListbox.SelectionChanged += new SelectionChangedEventHandler(ImgListbox_SelectionChanged); |
47 |
} |
48 |
} |
49 |
|
50 |
public ObservableCollection<ThumbnailItem> _thumbnailItems; |
51 |
private List<DOCPAGE> _PageList = null; |
52 |
private string _DefaultUri = null; |
53 |
public ThumbnailItem CurrentPage = null; |
54 |
public int PageCount = 0; |
55 |
|
56 |
private bool _Initialize; |
57 |
public event EventHandler<PageChangeEventArgs> PageChanged; |
58 |
public event EventHandler<PageChangeEventArgs> PageChanging; |
59 |
List<UsersCommentPagesMember> _UsersCommentPagesList = new List<UsersCommentPagesMember>(); |
60 |
public class PageChangeEventArgs : EventArgs |
61 |
{ |
62 |
public DOCPAGE CurrentPage { get; set; } |
63 |
public string PageUri { get; set; } |
64 |
public int PageNumber { get; set; } |
65 |
} |
66 |
|
67 |
private bool _IsFitOn { get; set; } |
68 |
public bool IsFitOn |
69 |
{ |
70 |
get |
71 |
{ |
72 |
return _IsFitOn; |
73 |
} |
74 |
set |
75 |
{ |
76 |
_IsFitOn = value; |
77 |
RaisePropertyChanged("IsFitOn"); |
78 |
} |
79 |
} |
80 |
|
81 |
public void RaisePropertyChanged(string propName) |
82 |
{ |
83 |
if (PropertyChanged != null) |
84 |
PropertyChanged(this, new PropertyChangedEventArgs(propName)); |
85 |
} |
86 |
|
87 |
public void SetPageNavi(List<DOCPAGE> PageList, string DefaultUri) |
88 |
{ |
89 |
Logger.sendCheckLog("SetPageNavi", 1); |
90 |
this._PageList = PageList; |
91 |
this._DefaultUri = DefaultUri; |
92 |
ThumbnailSet(); |
93 |
this.PageCount = PageList.Count(); |
94 |
//ThumbNmailSet(); |
95 |
rdoAllPages.Checked += new RoutedEventHandler(rdoCommented_Checked); |
96 |
rdoFavoritePages.Checked += new RoutedEventHandler(rdoFavoritePages_Checked); |
97 |
expCommentPages.PreviewCollapsed += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewCollapsed); |
98 |
expCommentPages.PreviewExpanded += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewExpanded); |
99 |
} |
100 |
void rdoCommented_Checked(object sender, RoutedEventArgs e) |
101 |
{ |
102 |
Logger.sendCheckLog("rdoCommented_Checked", 1); |
103 |
if (rdoAllPages.IsChecked == true) expCommentPages.IsExpanded = false; |
104 |
SetCommentPages(); |
105 |
} |
106 |
|
107 |
void rdoFavoritePages_Checked(object sender, RoutedEventArgs e) |
108 |
{ |
109 |
Logger.sendCheckLog("rdoFavoritePages_Checked", 1); |
110 |
if (rdoFavoritePages.IsChecked == true) |
111 |
expCommentPages.IsExpanded = false; |
112 |
|
113 |
_FavoriteSet = _FavoriteSet == null ? new List<FAVORITE_DOC>() : _FavoriteSet; |
114 |
if (_FavoriteSet.Count > 0) |
115 |
{ |
116 |
SetCommentPages_Favorite(); //수정 |
117 |
} |
118 |
else |
119 |
{ |
120 |
rdoAllPages.IsChecked = true; |
121 |
rdoFavoritePages.IsChecked = false; |
122 |
} |
123 |
} |
124 |
|
125 |
private void SetCommentPages_Favorite() |
126 |
{ |
127 |
ThumbnailSet(); |
128 |
SetCommentPages(); |
129 |
} |
130 |
|
131 |
void expCommentPages_PreviewCollapsed(object sender, Telerik.Windows.RadRoutedEventArgs e) |
132 |
{ |
133 |
//txtThumbCount.Visibility = Visibility.Collapsed; |
134 |
} |
135 |
|
136 |
void expCommentPages_PreviewExpanded(object sender, Telerik.Windows.RadRoutedEventArgs e) |
137 |
{ |
138 |
Logger.sendCheckLog("expCommentPages_PreviewExpanded", 1); |
139 |
rdoAllPages.IsChecked = false; |
140 |
rdoFavoritePages.IsChecked = false; |
141 |
//txtThumbCount.Visibility = Visibility.Visible; |
142 |
SetCommentPages(); |
143 |
} |
144 |
|
145 |
/// <summary> |
146 |
/// called when image list box's selection is changed |
147 |
/// </summary> |
148 |
/// <param name="sender"></param> |
149 |
/// <param name="e"></param> |
150 |
private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
151 |
{ |
152 |
if (ImgListbox.SelectedItem != null) |
153 |
{ |
154 |
int _CurrentPageNo = -1; |
155 |
if (this.CurrentPage != null) |
156 |
{ |
157 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); /// save controls |
158 |
_CurrentPageNo = this.CurrentPage.PageNumber; |
159 |
} |
160 |
|
161 |
this.CurrentPage = ImgListbox.SelectedItem as ThumbnailItem; |
162 |
int iPageNo = this.CurrentPage.PageNumber; |
163 |
if(_CurrentPageNo != iPageNo) |
164 |
{ |
165 |
PageChanging(this, new PageChangeEventArgs |
166 |
{ |
167 |
CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == iPageNo).First(), |
168 |
PageNumber = iPageNo, |
169 |
PageUri = null |
170 |
}); |
171 |
} |
172 |
} |
173 |
|
174 |
var border = VisualTreeHelper.GetChild(ImgListbox, 0); |
175 |
if(border!= null) |
176 |
{ |
177 |
IEnumerable<ScrollViewer> scrollViewer = border.ChildrenOfType<ScrollViewer>(); |
178 |
} |
179 |
} |
180 |
|
181 |
public bool GotoPageFlag = false; |
182 |
|
183 |
/// <summary> |
184 |
/// 해당 썸네일로 이동 |
185 |
/// </summary> |
186 |
/// <param name="_pageNumber">이동할 페이지 번호</param> |
187 |
public void GotoPage(int _pageNumber) |
188 |
{ |
189 |
try |
190 |
{ |
191 |
var _page = _thumbnailItems.Where(item => item.PageNumber == _pageNumber); |
192 |
if (_page.Count() > 0) |
193 |
{ |
194 |
ThumbnailItem thumbnailitem = _page.First(); |
195 |
if (PageChanging != null) |
196 |
{ |
197 |
var _itemIndex = this._thumbnailItems.IndexOf(thumbnailitem); |
198 |
ImgListbox.SelectedItem = thumbnailitem; |
199 |
|
200 |
if (_itemIndex < _thumbnailItems.Count() - 1) |
201 |
ImgListbox.ScrollIntoView(_itemIndex); |
202 |
else |
203 |
ImgListbox.ScrollIntoView(this._thumbnailItems.Count() - 1); |
204 |
} |
205 |
} |
206 |
} |
207 |
catch(Exception ex) |
208 |
{ |
209 |
Logger.sendResLog("GotoPage", ex.Message, 0); |
210 |
} |
211 |
} |
212 |
|
213 |
/// <summary> |
214 |
/// 주어진 페이지로 변경한다 |
215 |
/// </summary> |
216 |
/// <param name="iPageNo">변경할 페이지 번호</param> |
217 |
public void ChangePage(int iPageNo) |
218 |
{ |
219 |
var thumbitem = this._thumbnailItems.Where(item => item.PageNumber == iPageNo).FirstOrDefault(); |
220 |
if ((PageChanged != null) && (thumbitem != null)) |
221 |
{ |
222 |
var uri = _DefaultUri.Replace("{PageNo}", thumbitem.PageNumber.ToString()); |
223 |
|
224 |
var _DocPages = _PageList.Where(p => p.PAGE_NUMBER == thumbitem.PageNumber); |
225 |
if (_DocPages.Count() > 0) |
226 |
{ |
227 |
var _page = _DocPages.First(); |
228 |
|
229 |
PageChanged(this, new PageChangeEventArgs |
230 |
{ |
231 |
CurrentPage = _page, |
232 |
PageUri = uri, |
233 |
PageNumber = thumbitem.PageNumber |
234 |
}); |
235 |
ImgListbox.SelectedItem = thumbitem; |
236 |
this.CurrentPage = thumbitem; |
237 |
} |
238 |
else |
239 |
{ |
240 |
//System.Diagnostics.Debug.WriteLine("페이지 정보가 없습니다"); |
241 |
} |
242 |
} |
243 |
} |
244 |
|
245 |
public void GotoPageTALK(int _pageNumber, int _angle) |
246 |
{ |
247 |
int _PageNo = -1; |
248 |
|
249 |
if (int.TryParse(_pageNumber.ToString(), out _PageNo)) |
250 |
{ |
251 |
var _page = _thumbnailItems.Where(item => item.PageNumber == _PageNo); |
252 |
if (_page.Count() > 0) |
253 |
{ |
254 |
ThumbnailItem _item = _page.First(); |
255 |
setPageChangeTALK(_item, _angle); |
256 |
this.ImgListbox.SelectedIndex = _pageNumber - 1; |
257 |
this.ImgListbox.ScrollIntoView(_pageNumber - 1); |
258 |
} |
259 |
} |
260 |
} |
261 |
|
262 |
public void setPageChangeTALK(ThumbnailItem thumbnailItem, int _angle) |
263 |
{ |
264 |
if (thumbnailItem != null) |
265 |
{ |
266 |
if (PageChanging != null) |
267 |
{ |
268 |
///this.CurrentPage = _NextPage; |
269 |
///_NextPage = thumbnailItem; |
270 |
PageChanging(this, new PageChangeEventArgs |
271 |
{ |
272 |
CurrentPage = _PageList.Where(p => p.PAGE_NUMBER == thumbnailItem.PageNumber).First(), |
273 |
PageNumber = Convert.ToInt32(thumbnailItem.PageNumber), |
274 |
PageUri = null |
275 |
}); |
276 |
|
277 |
var instanceMain = this.ParentOfType<MainWindow>(); |
278 |
|
279 |
var rotationNum = (_angle - instanceMain.dzMainMenu.rotate.Angle) / 90; |
280 |
|
281 |
if (rotationNum > 0) // 1, 2, 3 |
282 |
{ |
283 |
for (int i = 0; i < rotationNum; i++) |
284 |
{ |
285 |
drawingPannelRotate(true); |
286 |
} |
287 |
} |
288 |
else if (rotationNum < 0)// -1, -2, -3 |
289 |
{ |
290 |
for (int i = 0; i < -rotationNum; i++) |
291 |
{ |
292 |
drawingPannelRotate(false); |
293 |
} |
294 |
} |
295 |
} |
296 |
} |
297 |
} |
298 |
|
299 |
public void drawingPannelRotate(bool Flag) |
300 |
{ |
301 |
var instanceMain = this.ParentOfType<MainWindow>(); |
302 |
|
303 |
if (Flag) |
304 |
{ |
305 |
if (instanceMain.dzMainMenu.rotate.Angle == 270) |
306 |
{ |
307 |
instanceMain.dzMainMenu.rotate.Angle = 0; |
308 |
} |
309 |
else |
310 |
{ |
311 |
instanceMain.dzMainMenu.rotate.Angle += 90; |
312 |
} |
313 |
} |
314 |
else |
315 |
{ |
316 |
if (instanceMain.dzMainMenu.rotate.Angle == 0) |
317 |
{ |
318 |
instanceMain.dzMainMenu.rotate.Angle = 270; |
319 |
} |
320 |
else |
321 |
{ |
322 |
instanceMain.dzMainMenu.rotate.Angle -= 90; |
323 |
} |
324 |
} |
325 |
|
326 |
if (instanceMain.dzMainMenu.zoomAndPanCanvas.Width == ViewerDataModel.Instance.ContentWidth) |
327 |
{ |
328 |
double emptySize = instanceMain.dzMainMenu.zoomAndPanCanvas.Width; |
329 |
instanceMain.dzMainMenu.zoomAndPanCanvas.Width = instanceMain.dzMainMenu.zoomAndPanCanvas.Height; |
330 |
instanceMain.dzMainMenu.zoomAndPanCanvas.Height = emptySize; |
331 |
} |
332 |
|
333 |
if (instanceMain.dzMainMenu.rotate.Angle == 0) |
334 |
{ |
335 |
instanceMain.dzMainMenu.translate.X = 0; |
336 |
instanceMain.dzMainMenu.translate.Y = 0; |
337 |
} |
338 |
else if (instanceMain.dzMainMenu.rotate.Angle == 90) |
339 |
{ |
340 |
instanceMain.dzMainMenu.translate.X = instanceMain.dzMainMenu.zoomAndPanCanvas.Width; |
341 |
instanceMain.dzMainMenu.translate.Y = 0; |
342 |
} |
343 |
else if (instanceMain.dzMainMenu.rotate.Angle == 180) |
344 |
{ |
345 |
instanceMain.dzMainMenu.translate.X = instanceMain.dzMainMenu.zoomAndPanCanvas.Width; |
346 |
instanceMain.dzMainMenu.translate.Y = instanceMain.dzMainMenu.zoomAndPanCanvas.Height; |
347 |
} |
348 |
else |
349 |
{ |
350 |
instanceMain.dzMainMenu.translate.X = 0; |
351 |
instanceMain.dzMainMenu.translate.Y = instanceMain.dzMainMenu.zoomAndPanCanvas.Height; |
352 |
} |
353 |
|
354 |
instanceMain.dzMainMenu.zoomAndPanControl.RotationAngle = instanceMain.dzMainMenu.rotate.Angle; |
355 |
ViewerDataModel.Instance.ContentWidth = instanceMain.dzMainMenu.zoomAndPanCanvas.Width; |
356 |
ViewerDataModel.Instance.ContentHeight = instanceMain.dzMainMenu.zoomAndPanCanvas.Height; |
357 |
ViewerDataModel.Instance.AngleOffsetX = instanceMain.dzMainMenu.translate.X; |
358 |
ViewerDataModel.Instance.AngleOffsetY = instanceMain.dzMainMenu.translate.Y; |
359 |
ViewerDataModel.Instance.Angle = instanceMain.dzMainMenu.rotate.Angle; |
360 |
|
361 |
instanceMain.dzMainMenu.pageNavigator._thumbnailItems.Where(info => info.PageNumber == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).ToList().ForEach(data => |
362 |
{ |
363 |
data.Angle = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString()); |
364 |
|
365 |
instanceMain.dzMainMenu.pageNavigator.ImgListbox.ItemsSource = instanceMain.dzMainMenu.pageNavigator._thumbnailItems; |
366 |
var instance = instanceMain.dzMainMenu.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).FirstOrDefault(); |
367 |
instance.PAGE_ANGLE = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString()); |
368 |
|
369 |
var rotationdoc = ViewerDataModel.Instance.RotationDocs.Where(d => d.ID == instance.ID).FirstOrDefault(); |
370 |
if (rotationdoc != null) |
371 |
{ |
372 |
rotationdoc.PAGE_ANGLE = instance.PAGE_ANGLE; |
373 |
} |
374 |
else |
375 |
{ |
376 |
ViewerDataModel.Instance.RotationDocs.Add(instance); |
377 |
} |
378 |
instanceMain.dzMainMenu.pageNavigator.GotoPage(data.PageNumber); |
379 |
}); |
380 |
} |
381 |
|
382 |
void lstSelectComment_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
383 |
{ |
384 |
SetCommentPages(); |
385 |
} |
386 |
|
387 |
|
388 |
void user_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
389 |
{ |
390 |
SetCommentPages(); |
391 |
//System.Diagnostics.Debug.WriteLine(e.PropertyName); |
392 |
} |
393 |
public void SetCommentPages() |
394 |
{ |
395 |
ThumbnailSet(); |
396 |
SetCommentList(_UsersCommentPagesList.ToList()); |
397 |
} |
398 |
|
399 |
public void SetCommentList(List<UsersCommentPagesMember> UsersCommentPagesList) |
400 |
{ |
401 |
Logger.sendCheckLog("SetCommentList", 1); |
402 |
Logger.sendCheckLog("SetCommentList_기존 Comment 색상 제거", 1); |
403 |
#region 기존 색상 제거 작업 |
404 |
foreach (var item in this._thumbnailItems) |
405 |
{ |
406 |
item.DisplayColorItems.Clear(); |
407 |
} |
408 |
#endregion |
409 |
|
410 |
Logger.sendCheckLog("SetCommentList_delItem select 및 remove", 1); |
411 |
List<UsersCommentPagesMember> _delItem = new List<UsersCommentPagesMember>(); |
412 |
|
413 |
_UsersCommentPagesList.ToList().ForEach(item => |
414 |
{ |
415 |
var _comm = UsersCommentPagesList.Where(a => a.MarkupInfoID == item.MarkupInfoID); |
416 |
|
417 |
if (_comm.Count() == 0) |
418 |
{ |
419 |
_delItem.Add(item); |
420 |
} |
421 |
}); |
422 |
|
423 |
_delItem.ForEach(f => _UsersCommentPagesList.Remove(f)); |
424 |
|
425 |
Logger.sendCheckLog("SetCommentList_UsersCommentPagesMember_PropertyChanged", 1); |
426 |
UsersCommentPagesList.ForEach(user => |
427 |
{ |
428 |
user.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(user_PropertyChanged); |
429 |
user.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(user_PropertyChanged); |
430 |
|
431 |
var _commLst = _UsersCommentPagesList.Where(o => o.MarkupInfoID == user.MarkupInfoID); |
432 |
|
433 |
if (_commLst.Count() == 0) |
434 |
{ |
435 |
_UsersCommentPagesList.Add(user); |
436 |
} |
437 |
else |
438 |
{ |
439 |
if (_commLst.First().PageNumber != user.PageNumber) |
440 |
_commLst.First().PageNumber = user.PageNumber; |
441 |
} |
442 |
|
443 |
user.PageNumber.ForEach(page => |
444 |
{ |
445 |
var _items = this._thumbnailItems.Where(item => item.PageNumber == page); |
446 |
|
447 |
if (_items.Count() > 0) |
448 |
_items.First().DisplayColorItems.Add(new SetColorMarkupItem { DisplayColor = user.SetColor }); |
449 |
}); |
450 |
}); |
451 |
|
452 |
|
453 |
Logger.sendCheckLog("SetCommentList_SelectComment.ItemsSource 설정", 1); |
454 |
var data = _UsersCommentPagesList.OrderByDescending(p => p.isConSolidation == Convert.ToInt32(true)).ToList(); |
455 |
if (data.Count() != 0) |
456 |
{ |
457 |
if (Convert.ToBoolean(data.First().isConSolidation)) |
458 |
{ |
459 |
data.Where(p => p.isConSolidation == Convert.ToInt32(true)).FirstOrDefault().UserName = "Consolidated"; |
460 |
data.Where(p => p.isConSolidation == Convert.ToInt32(true)).FirstOrDefault().Depart = ""; |
461 |
this.lstSelectComment.ItemsSource = data; |
462 |
} |
463 |
else |
464 |
{ |
465 |
this.lstSelectComment.ItemsSource = _UsersCommentPagesList; //섬네일 |
466 |
} |
467 |
} |
468 |
else |
469 |
{ |
470 |
this.lstSelectComment.ItemsSource = _UsersCommentPagesList; //섬네일 |
471 |
} |
472 |
//this.ImgListbox.ItemsSource = null; |
473 |
Logger.sendCheckLog("SetCommentList_ImgListbox 설정", 1); |
474 |
|
475 |
|
476 |
this.ImgListbox.ItemsSource = this._thumbnailItems; |
477 |
var template = this.ImgListbox.ItemTemplate; |
478 |
this.ImgListbox.ItemTemplate = null; |
479 |
this.ImgListbox.ItemTemplate = template; |
480 |
//Logger.sendCheckLog("SetCommentList_ImgListbox UpdateLayout_Start", 1); |
481 |
//this.ImgListbox.UpdateLayout(); |
482 |
//Logger.sendCheckLog("SetCommentList_ImgListbox UpdateLayout_End", 1); |
483 |
|
484 |
} |
485 |
|
486 |
private void ThumbnailSet() |
487 |
{ |
488 |
Logger.sendCheckLog("ThumbnailSet", 1); |
489 |
if (!_Initialize) return; |
490 |
|
491 |
this._thumbnailItems = new ObservableCollection<ThumbnailItem>(); |
492 |
List<int> _selectComment = new List<int>(); |
493 |
if (this.lstSelectComment.ItemsSource != null) |
494 |
{ |
495 |
var _pages = from commentPage in this.lstSelectComment.ItemsSource.Cast<UsersCommentPagesMember>() |
496 |
where commentPage.IsSelected == true |
497 |
select commentPage.PageNumber; |
498 |
|
499 |
foreach (var item in _pages) |
500 |
{ |
501 |
item.ForEach(pp => _selectComment.Add(pp)); |
502 |
} |
503 |
|
504 |
_selectComment.Distinct(); |
505 |
} |
506 |
|
507 |
var uri = _DefaultUri.Replace("{0}/{1}_{2}", "8/0_0"); |
508 |
this._PageList = this._PageList.OrderBy(data => data.PAGE_NUMBER).ToList(); |
509 |
//this._PageList.ForEach(page => |
510 |
ViewerDataModel.Instance.Document_Info.OrderBy(data => data.PAGE_NUMBER).ToList().ForEach(page => |
511 |
{ |
512 |
var _pageNo = page.PAGE_NUMBER; |
513 |
bool _addFlag = false; |
514 |
|
515 |
if (rdoFavoritePages.IsChecked == false) |
516 |
{ |
517 |
if (_selectComment.Count() > 0) |
518 |
{ |
519 |
if ((rdoAllPages.IsChecked == true) |
520 |
|| (expCommentPages.IsExpanded == true && _selectComment.Where(s => s == _pageNo).Count() > 0)) |
521 |
{ |
522 |
_addFlag = true; |
523 |
} |
524 |
} |
525 |
else |
526 |
{ |
527 |
//if (App.ViewInfo.IsCustomPage) |
528 |
//{ |
529 |
// //_addFlag = false; |
530 |
|
531 |
// //App.ViewInfo.IsCustomPage = false; |
532 |
// //this.rdoAllPages.Visibility = System.Windows.Visibility.Collapsed; |
533 |
// //this.lstSelectComment.Visibility = System.Windows.Visibility.Collapsed; |
534 |
// this.rdoAllPages.IsChecked = false; |
535 |
// this.rdoFavoritePages.IsChecked = true; |
536 |
// //SetCommentPages(); |
537 |
//} |
538 |
//else |
539 |
//{ |
540 |
_addFlag = true; |
541 |
//} |
542 |
} |
543 |
} |
544 |
|
545 |
|
546 |
if (_addFlag) |
547 |
{ |
548 |
this._thumbnailItems.Add(new ThumbnailItem |
549 |
{ |
550 |
ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())), |
551 |
PageNumber = _pageNo, |
552 |
Angle = page.PAGE_ANGLE, |
553 |
}); |
554 |
} |
555 |
else |
556 |
{ |
557 |
if ((rdoFavoritePages.IsChecked == true) && _FavoriteSet.Where(data => data.PAGE_NO == _pageNo).FirstOrDefault() != null) |
558 |
{ |
559 |
this._thumbnailItems.Add(new ThumbnailItem |
560 |
{ |
561 |
ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())), |
562 |
PageNumber = _pageNo, |
563 |
Angle = page.PAGE_ANGLE, |
564 |
}); |
565 |
} |
566 |
} |
567 |
|
568 |
|
569 |
|
570 |
//this._thumbnailItems.Add(new ThumbnailItem |
571 |
//{ |
572 |
// ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())), |
573 |
|
574 |
// //ImageUri = new Uri(@"http://www.honeyhead.net/Pages/000000/111111/11111111/1.cmp"), |
575 |
|
576 |
// //ImageUri = new Uri(@"https://image.freepik.com/free-vector/abstract-logo-in-flame-shape_1043-44.jpg"), |
577 |
// //DisplayColorItems = pageColor, |
578 |
// PageNumber = Convert.ToInt32(_pageNo), |
579 |
// Angle = Convert.ToInt32(page.PAGE_ANGLE), |
580 |
//}); |
581 |
}); |
582 |
|
583 |
//txtTotPageNo.Text = this._PageList.Count().ToString(); |
584 |
|
585 |
//txtThumbCount.Text = String.Format("Count : {0}", (this._thumbnailItems.Count).ToString()); |
586 |
|
587 |
if (ImgListbox.ItemsSource == null) |
588 |
{ |
589 |
ImgListbox.ItemsSource = this._thumbnailItems; |
590 |
|
591 |
this._thumbnailItems.ToList().ForEach(data => |
592 |
{ |
593 |
data.Width = ImgListbox.ActualWidth; |
594 |
data.Height = ImgListbox.ActualHeight; |
595 |
}); |
596 |
|
597 |
if (ImgListbox.Items.Count > 0) |
598 |
{ |
599 |
//int StartPageIdx = Convert.ToInt32(App.ViewInfo.StartPage) - 1; |
600 |
int StartPageIdx = 1; |
601 |
//if (App.ViewInfo.IsCustomPage) |
602 |
//{ |
603 |
// ImgListbox.SelectedItem = ImgListbox.Items.Where(data => (data as ThumbnailItem).PageNumber == Convert.ToInt32(App.ViewInfo.StartPage)).FirstOrDefault(); |
604 |
//} |
605 |
//else |
606 |
//{ |
607 |
|
608 |
if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1) |
609 |
{ |
610 |
ImgListbox.SelectedItem = ImgListbox.Items[0]; |
611 |
} |
612 |
else |
613 |
{ |
614 |
ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx]; |
615 |
} |
616 |
//} |
617 |
} |
618 |
} |
619 |
else |
620 |
{ |
621 |
ImgListbox.UpdateLayout(); |
622 |
ImgListbox.ItemsSource = this._thumbnailItems; |
623 |
} |
624 |
} |
625 |
|
626 |
private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) |
627 |
{ |
628 |
if (e.ClickCount >= 2) |
629 |
{ |
630 |
var selectItem = gogogo.SelectedItem as IKCOM.MarkupItem; |
631 |
GotoPage(selectItem.PageNumber); |
632 |
var result = MarkupParser.GetBaseControl(selectItem.Data); |
633 |
Rect rect = new Rect(new Point(result.StartPoint.X - 100, result.StartPoint.Y - 100), new Point(result.EndPoint.X + 100, result.EndPoint.Y + 100)); |
634 |
this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect); |
635 |
//bool isGO = false; |
636 |
|
637 |
//var imageViewer = this.ParentOfType<KCOM.Views.MainMenu>().imageViewer; |
638 |
//imageViewer.SizeMode = Leadtools.Windows.Controls.SizeMode.Fit; |
639 |
//imageViewer.InteractiveMode = Leadtools.Windows.Controls.InteractiveMode.UserRectangle; |
640 |
//imageViewer.InteractiveUserRectangle += (sen, ea) => |
641 |
//{ |
642 |
// System.Diagnostics.Debug.WriteLine(ea.Bounds); |
643 |
// if (ea.Status == Leadtools.Windows.Controls.InteractiveModeStatus.End) |
644 |
// { |
645 |
// this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(ea.Bounds); |
646 |
// } |
647 |
|
648 |
//}; |
649 |
//imageViewer.SizeMode = Leadtools.Windows.Controls.SizeMode.Normal; |
650 |
|
651 |
//GotoPage(gogogo.SelectedItem as MarkupList) |
652 |
} |
653 |
} |
654 |
|
655 |
private void commentUser_SelectionChanged(object sender, SelectionChangedEventArgs e) |
656 |
{ |
657 |
tbSearch.Text = string.Empty; |
658 |
if (e.AddedItems.Count > 0) |
659 |
{ |
660 |
if (commentUser.Items.Count > 0) |
661 |
{ |
662 |
MarkupInfoSmallList.Clear(); |
663 |
//var d = e.AddedItems.Cast<MarkupInfoItem>().FirstOrDefault().MarkupList.First(); |
664 |
//d.PageNumber |
665 |
|
666 |
//e.AddedItems.Cast<MarkupInfoItem>().FirstOrDefault().MarkupList.First(). |
667 |
//gogo.DataContext = e.AddedItems.Cast<MarkupInfoItem>().FirstOrDefault().MarkupList; |
668 |
|
669 |
//gogogo.ItemsSource = e.AddedItems.Cast<MarkupInfoItem>().FirstOrDefault().MarkupList; |
670 |
//gogogo.ItemsSource = ViewerDataModel.Instance._markupInfoList.Where(d=>d.UserName == sender as RadCombo |
671 |
|
672 |
var temp = e.AddedItems.Cast<MarkupInfoItem>().FirstOrDefault(); |
673 |
var markuplist = ViewerDataModel.Instance.MyMarkupList.Where(d => d.MarkupInfoID == temp.MarkupInfoID).ToList(); |
674 |
markuplist.ForEach(d => |
675 |
{ |
676 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
677 |
{ |
678 |
Data = d.Data, |
679 |
Data_Type = d.Data_Type, |
680 |
PageNumber = d.PageNumber, |
681 |
UserID = temp.UserID, |
682 |
UserName = temp.UserName, |
683 |
}); |
684 |
}); |
685 |
gogogo.ItemsSource = null; |
686 |
gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
687 |
|
688 |
} |
689 |
} |
690 |
else |
691 |
{ |
692 |
MarkupInfoSmallList.Clear(); |
693 |
ViewerDataModel.Instance._markupInfoList.ToList().ForEach(d => |
694 |
{ |
695 |
var markuplist = ViewerDataModel.Instance.MyMarkupList.Where(u => u.MarkupInfoID == d.MarkupInfoID).ToList(); |
696 |
|
697 |
markuplist.ForEach(b => |
698 |
{ |
699 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
700 |
{ |
701 |
|
702 |
Data = b.Data, |
703 |
Data_Type = b.Data_Type, |
704 |
PageNumber = b.PageNumber, |
705 |
UserID = d.UserID, |
706 |
UserName = d.UserName, |
707 |
}); |
708 |
}); |
709 |
|
710 |
}); |
711 |
gogogo.ItemsSource = null; |
712 |
gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
713 |
} |
714 |
} |
715 |
|
716 |
public class MarkupInfoItemSmall |
717 |
{ |
718 |
public string Id { get; set; } |
719 |
public string UserName { get; set; } |
720 |
public string UserID { get; set; } |
721 |
public int PageNumber { get; set; } |
722 |
public string Data { get; set; } |
723 |
public int Data_Type { get; set; } |
724 |
} |
725 |
|
726 |
private List<MarkupInfoItemSmall> _MarkupInfoSmallList { get; set; } |
727 |
public List<MarkupInfoItemSmall> MarkupInfoSmallList |
728 |
{ |
729 |
get |
730 |
{ |
731 |
if (_MarkupInfoSmallList == null) |
732 |
{ |
733 |
_MarkupInfoSmallList = new List<MarkupInfoItemSmall>(); |
734 |
} |
735 |
return _MarkupInfoSmallList; |
736 |
} |
737 |
set |
738 |
{ |
739 |
|
740 |
_MarkupInfoSmallList = value; |
741 |
RaisePropertyChanged("MarkupInfoSmallList"); |
742 |
} |
743 |
} |
744 |
|
745 |
/// <summary> |
746 |
/// goto page and select item selected by user |
747 |
/// </summary> |
748 |
/// <param name="sender"></param> |
749 |
/// <param name="e"></param> |
750 |
private void RadButton_Click(object sender, RoutedEventArgs e) |
751 |
{ |
752 |
var clickButtonItem = sender as RadButton; |
753 |
if (clickButtonItem != null && clickButtonItem.CommandParameter != null) |
754 |
{ |
755 |
try |
756 |
{ |
757 |
Rect rect = new Rect(); |
758 |
Point s_point = new Point(); |
759 |
Point e_point = new Point(); |
760 |
|
761 |
MarkupInfoItemSmall gaza = clickButtonItem.CommandParameter as MarkupInfoItemSmall; |
762 |
GotoPage(Convert.ToInt32(gaza.PageNumber)); |
763 |
|
764 |
var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(gaza.Data.ToString()); //언패킹작업 |
765 |
switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), gaza.Data_Type.ToString())) |
766 |
{ |
767 |
case MarkupToPDF.Controls.Common.ControlType.TextControl: |
768 |
{ |
769 |
MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data); |
770 |
rect = new Rect(new Point(instance.StartPoint.X - 100, instance.StartPoint.Y - 100), new Point(instance.StartPoint.X + instance.BoxW + 100, instance.StartPoint.Y + instance.BoxW + 100)); |
771 |
} |
772 |
break; |
773 |
case MarkupToPDF.Controls.Common.ControlType.TextBorder: |
774 |
{ |
775 |
MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data); |
776 |
rect = new Rect(new Point(instance.StartPoint.X - 100, instance.StartPoint.Y - 100), new Point(instance.StartPoint.X + instance.BoxW + 100, instance.StartPoint.Y + instance.BoxW + 100)); |
777 |
} |
778 |
break; |
779 |
case MarkupToPDF.Controls.Common.ControlType.TextCloud: |
780 |
{ |
781 |
MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data); |
782 |
rect = new Rect(new Point(instance.StartPoint.X - 100, instance.StartPoint.Y - 100), new Point(instance.StartPoint.X + instance.BoxW + 100, instance.StartPoint.Y + instance.BoxW + 100)); |
783 |
} |
784 |
break; |
785 |
case MarkupToPDF.Controls.Common.ControlType.PolygonControl: |
786 |
{ |
787 |
MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data); |
788 |
|
789 |
foreach (Point A in instance.PointSet) |
790 |
{ |
791 |
if (s_point == new Point()) |
792 |
{ |
793 |
s_point = A; |
794 |
e_point = A; |
795 |
} |
796 |
s_point.X = Math.Min(s_point.X, A.X); |
797 |
s_point.Y = Math.Min(s_point.Y, A.Y); |
798 |
e_point.X = Math.Max(e_point.X, A.X); |
799 |
e_point.Y = Math.Max(e_point.Y, A.Y); |
800 |
} |
801 |
rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100)); |
802 |
} |
803 |
break; |
804 |
case MarkupToPDF.Controls.Common.ControlType.PolygonCloud: |
805 |
{ |
806 |
MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data); |
807 |
|
808 |
foreach (Point A in instance.PointSet) |
809 |
{ |
810 |
if (s_point == new Point()) |
811 |
{ |
812 |
s_point = A; |
813 |
e_point = A; |
814 |
} |
815 |
s_point.X = Math.Min(s_point.X, A.X); |
816 |
s_point.Y = Math.Min(s_point.Y, A.Y); |
817 |
e_point.X = Math.Max(e_point.X, A.X); |
818 |
e_point.Y = Math.Max(e_point.Y, A.Y); |
819 |
} |
820 |
rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100)); |
821 |
} |
822 |
break; |
823 |
case MarkupToPDF.Controls.Common.ControlType.ChainLine: |
824 |
{ |
825 |
MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data); |
826 |
|
827 |
foreach (Point A in instance.PointSet) |
828 |
{ |
829 |
if (s_point == new Point()) |
830 |
{ |
831 |
s_point = A; |
832 |
e_point = A; |
833 |
} |
834 |
s_point.X = Math.Min(s_point.X, A.X); |
835 |
s_point.Y = Math.Min(s_point.Y, A.Y); |
836 |
e_point.X = Math.Max(e_point.X, A.X); |
837 |
e_point.Y = Math.Max(e_point.Y, A.Y); |
838 |
} |
839 |
rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100)); |
840 |
} |
841 |
break; |
842 |
case MarkupToPDF.Controls.Common.ControlType.Ink: |
843 |
{ |
844 |
MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data); |
845 |
|
846 |
foreach (Point A in instance.PointSet) |
847 |
{ |
848 |
if (s_point == new Point()) |
849 |
{ |
850 |
s_point = A; |
851 |
e_point = A; |
852 |
} |
853 |
s_point.X = Math.Min(s_point.X, A.X); |
854 |
s_point.Y = Math.Min(s_point.Y, A.Y); |
855 |
e_point.X = Math.Max(e_point.X, A.X); |
856 |
e_point.Y = Math.Max(e_point.Y, A.Y); |
857 |
} |
858 |
rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100)); |
859 |
} |
860 |
break; |
861 |
default: |
862 |
MarkupToPDF.Serialize.S_Control.S_BaseControl item = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data); |
863 |
rect = new Rect(new Point(item.StartPoint.X - 100, item.StartPoint.Y - 100), new Point(item.EndPoint.X + 100, item.EndPoint.Y + 100)); |
864 |
break; |
865 |
} |
866 |
|
867 |
SelectionSet.Instance.SelectItemByRect(rect, this.ParentOfType<KCOM.Views.MainMenu>()); |
868 |
this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect); |
869 |
} |
870 |
catch (Exception ex) |
871 |
{ |
872 |
this.ParentOfType<KCOM.Views.MainMenu>().DialogMessage_Alert(ex.Message, "Error"); |
873 |
} |
874 |
} |
875 |
} |
876 |
|
877 |
private void gogogo_Loaded(object sender, RoutedEventArgs e) |
878 |
{ |
879 |
if (MarkupInfoSmallList.Count == 0) |
880 |
{ |
881 |
ViewerDataModel.Instance._markupInfoList.ToList().ForEach(d => |
882 |
{ |
883 |
if (d.MarkupList != null) |
884 |
{ |
885 |
d.MarkupList.ForEach(b => |
886 |
{ |
887 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
888 |
{ |
889 |
Id = b.ID, |
890 |
Data = b.Data, |
891 |
Data_Type = b.Data_Type, |
892 |
PageNumber = b.PageNumber, |
893 |
UserID = d.UserID, |
894 |
UserName = d.UserName, |
895 |
}); |
896 |
}); |
897 |
} |
898 |
}); |
899 |
gogogo.ItemsSource = null; |
900 |
gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
901 |
|
902 |
commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList(); |
903 |
commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList(); |
904 |
} |
905 |
} |
906 |
|
907 |
private void commentType_SelectionChanged(object sender, SelectionChangedEventArgs e) |
908 |
{ |
909 |
gogogo.ItemsSource = null; |
910 |
tbSearch.Text = string.Empty; |
911 |
if (e.AddedItems.Count > 0) |
912 |
{ |
913 |
|
914 |
gogogo.ItemsSource = MarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(e.AddedItems[0])).ToList(); |
915 |
} |
916 |
else |
917 |
{ |
918 |
gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
919 |
} |
920 |
} |
921 |
|
922 |
private void commentPage_SelectionChanged(object sender, SelectionChangedEventArgs e) |
923 |
{ |
924 |
gogogo.ItemsSource = null; |
925 |
tbSearch.Text = string.Empty; |
926 |
if (e.AddedItems.Count > 0) |
927 |
{ |
928 |
gogogo.ItemsSource = MarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(e.AddedItems[0])).ToList(); |
929 |
} |
930 |
else |
931 |
{ |
932 |
gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
933 |
} |
934 |
} |
935 |
|
936 |
private void btnPanorama_Click(object sender, RoutedEventArgs e) |
937 |
{ |
938 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.PanoramaShow(); |
939 |
} |
940 |
|
941 |
private void btnSearch_Click(object sender, RoutedEventArgs e) |
942 |
{ |
943 |
string search_str = tbSearch.Text; |
944 |
var sel_type = commentType.SelectedItem; |
945 |
var sel_user = commentUser.SelectedItem; |
946 |
var sel_page = commentPage.SelectedItem; |
947 |
List<MarkupInfoItemSmall> small_list = new List<MarkupInfoItemSmall>(); |
948 |
List<MarkupInfoItemSmall> list = MarkupInfoSmallList; |
949 |
if (sel_page != null) |
950 |
{ |
951 |
list = list.Where(d => d.PageNumber == Convert.ToInt32(sel_page)).ToList(); |
952 |
} |
953 |
if (sel_type != null) |
954 |
{ |
955 |
list = list.Where(d => d.Data_Type == Convert.ToInt32(sel_type)).ToList(); |
956 |
} |
957 |
if (sel_user != null) |
958 |
{ |
959 |
list = list.Where(d => d.UserID == (sel_user as MarkupInfoItem).UserID).ToList(); |
960 |
} |
961 |
foreach (var item in list) |
962 |
{ |
963 |
var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(item.Data.ToString()); |
964 |
|
965 |
switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), item.Data_Type.ToString())) |
966 |
{ |
967 |
case MarkupToPDF.Controls.Common.ControlType.TextControl: |
968 |
case MarkupToPDF.Controls.Common.ControlType.TextBorder: |
969 |
case MarkupToPDF.Controls.Common.ControlType.TextCloud: |
970 |
{ |
971 |
MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data); |
972 |
if (instance.Text.Contains(search_str)) |
973 |
{ |
974 |
small_list.Add(item); |
975 |
} |
976 |
} |
977 |
break; |
978 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTextBorderControl: |
979 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTextCloudControl: |
980 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTextControl: |
981 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextBorderControl: |
982 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextCloudControl: |
983 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextControl: |
984 |
{ |
985 |
MarkupToPDF.Serialize.S_Control.S_ArrowTextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_ArrowTextControl>(data); |
986 |
if (instance.ArrowText.Contains(search_str)) |
987 |
{ |
988 |
small_list.Add(item); |
989 |
} |
990 |
} |
991 |
break; |
992 |
|
993 |
} |
994 |
|
995 |
} |
996 |
|
997 |
gogogo.ItemsSource = null; |
998 |
gogogo.ItemsSource = small_list.OrderBy(d => d.PageNumber).ToList(); |
999 |
tbSearch.Text = string.Empty; |
1000 |
} |
1001 |
} |
1002 |
} |