프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Controls / Sample.xaml.cs @ b7645ccc

이력 | 보기 | 이력해설 | 다운로드 (47.1 KB)

1
using IKCOM;
2
using KCOM.Common;
3
using KCOMDataModel.DataModel;
4
using MarkupToPDF.Common;
5
using MarkupToPDF.Controls.Parsing;
6
using System;
7
using System.Collections.Generic;
8
using System.Collections.ObjectModel;
9
using System.ComponentModel;
10
using System.Diagnostics;
11
using System.Linq;
12
using System.Windows;
13
using System.Windows.Controls;
14
using System.Windows.Input;
15
using System.Windows.Media;
16
using Telerik.Windows.Controls;
17
using static MarkupToPDF.Controls.Parsing.MarkupParser;
18

    
19
namespace KCOM.Controls
20
{
21
    /// <summary>
22
    /// Interaction logic for PageNavigator.xaml
23
    /// </summary>
24
    public partial class Sample : UserControl, INotifyPropertyChanged
25
    {
26
        public List<FAVORITE_DOC> _FavoriteSet { get; set; }
27
        public event PropertyChangedEventHandler PropertyChanged;
28
        public Sample()
29
        {             
30
            App.splashString(ISplashMessage.SAMPLE);
31
            this.Loaded += Sample_Loaded;
32
        }
33

    
34
        private void Sample_Loaded(object sender, RoutedEventArgs e)
35
        {
36
            if(!_Initialize)
37
            {
38
                InitializeComponent();
39
                _Initialize = true;
40
                this.lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged);
41
                this.ImgListbox.SelectionChanged += new SelectionChangedEventHandler(ImgListbox_SelectionChanged);                
42
            }            
43
        }
44

    
45
        public ObservableCollection<ThumbnailItem> _thumbnailItems;
46
        private List<DOCPAGE> _PageList = null;
47
        private string _DefaultUri = null;
48
        public ThumbnailItem CurrentPage = null;
49
        public int PageCount = 0;
50
        private bool _Initialize;
51
        public event EventHandler<PageChangeEventArgs> PageChanged;
52
        public event EventHandler<PageChangeEventArgs> PageChanging;
53
        List<UsersCommentPagesMember> _UsersCommentPagesList = new List<UsersCommentPagesMember>();
54
        public class PageChangeEventArgs : EventArgs
55
        {
56
            public DOCPAGE CurrentPage { get; set; }
57
            public string PageUri { get; set; }
58
            public int PageNumber { get; set; }
59
        }
60
        private bool _IsFitOn { get; set; }
61
        public bool IsFitOn
62
        {
63
            get
64
            {
65
                return _IsFitOn;
66
            }
67
            set
68
            {
69
                _IsFitOn = value;
70
                RaisePropertyChanged("IsFitOn");
71
            }
72
        }
73

    
74
        public void RaisePropertyChanged(string propName)
75
        {
76
            if (PropertyChanged != null)
77
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
78
        }
79

    
80
        public void SetPageNavi(List<DOCPAGE> PageList, string DefaultUri)
81
        {
82
            Logger.sendCheckLog("SetPageNavi", 1);
83
            this._PageList = PageList;
84
            this._DefaultUri = DefaultUri;
85
            ThumbnailSet();
86
            this.PageCount = PageList.Count();
87
            //ThumbNmailSet();
88
            rdoAllPages.Checked += new RoutedEventHandler(rdoCommented_Checked);
89
            rdoFavoritePages.Checked += new RoutedEventHandler(rdoFavoritePages_Checked);
90
            expCommentPages.PreviewCollapsed += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewCollapsed);
91
            expCommentPages.PreviewExpanded += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewExpanded);
92
        }
93

    
94
        void rdoCommented_Checked(object sender, RoutedEventArgs e)
95
        {
96
            Logger.sendCheckLog("rdoCommented_Checked", 1);
97
            if (rdoAllPages.IsChecked == true) expCommentPages.IsExpanded = false;
98
            SetCommentPages();
99
        }
100

    
101
        void rdoFavoritePages_Checked(object sender, RoutedEventArgs e)
102
        {
103
            Logger.sendCheckLog("rdoFavoritePages_Checked", 1);
104
            if (rdoFavoritePages.IsChecked == true)
105
                expCommentPages.IsExpanded = false;
106

    
107
            _FavoriteSet = _FavoriteSet == null ? new List<FAVORITE_DOC>() : _FavoriteSet;
108
            if (_FavoriteSet.Count > 0)
109
            {
110
                SetCommentPages_Favorite(); //수정    
111
            }
112
            else
113
            {
114
                rdoAllPages.IsChecked = true;
115
                rdoFavoritePages.IsChecked = false;
116
            }
117
        }
118

    
119
        private void SetCommentPages_Favorite()
120
        {
121
            ThumbnailSet();            
122
            SetCommentPages();
123
        }
124

    
125
        void expCommentPages_PreviewCollapsed(object sender, Telerik.Windows.RadRoutedEventArgs e)
126
        {
127
            //txtThumbCount.Visibility = Visibility.Collapsed;            
128
        }
129

    
130
        void expCommentPages_PreviewExpanded(object sender, Telerik.Windows.RadRoutedEventArgs e)
131
        {
132
            Logger.sendCheckLog("expCommentPages_PreviewExpanded", 1);
133
            rdoAllPages.IsChecked = false;
134
            rdoFavoritePages.IsChecked = false;
135
            //txtThumbCount.Visibility = Visibility.Visible;
136
            SetCommentPages();
137
        }
138

    
139
        /// <summary>
140
        /// called when image list box's selection is changed
141
        /// </summary>
142
        /// <param name="sender"></param>
143
        /// <param name="e"></param>
144
        private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
145
        {            
146
            if (ImgListbox.SelectedItem != null)
147
            {
148
                int _CurrentPageNo = -1;
149
                if (this.CurrentPage != null)
150
                {
151
                    this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null);   /// save controls
152
                    _CurrentPageNo = this.CurrentPage.PageNumber;
153
                }
154

    
155
                this.CurrentPage = ImgListbox.SelectedItem as ThumbnailItem;
156
                int iPageNo = this.CurrentPage.PageNumber;
157
                if(_CurrentPageNo != iPageNo)
158
                {
159
                    PageChanging(this, new PageChangeEventArgs
160
                    {
161
                        CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == iPageNo).First(),
162
                        PageNumber = iPageNo,
163
                        PageUri = null
164
                    });
165
                }
166
            }
167

    
168
            //var border = VisualTreeHelper.GetChild(ImgListbox, 0);
169
            //if (border != null)
170
            //{
171
            //    IEnumerable<ScrollViewer> scrollViewer = border.ChildrenOfType<ScrollViewer>();
172

    
173
            //}
174
            //ScrollViewer scrollViewer = (sender as RadListBox) as ScrollViewer;
175

    
176
            
177
            //System.Diagnostics.Debug.WriteLine("page:"+ImgListbox.SelectedIndex);
178
        }
179

    
180
        public bool GotoPageFlag = false;
181

    
182
        /// <summary>
183
        /// 해당 썸네일로 이동
184
        /// </summary>
185
        /// <param name="_pageNumber">이동할 페이지 번호</param>
186
        public void GotoPage(int _pageNumber)
187
        {
188
            try
189
            {
190
                var _page = _thumbnailItems.Where(item => item.PageNumber == _pageNumber);
191
                if (_page.Count() > 0)
192
                {
193
                    ThumbnailItem thumbnailitem = _page.First();
194
                    if (PageChanging != null)
195
                    {
196
                        var _itemIndex = this._thumbnailItems.IndexOf(thumbnailitem);
197
                        ImgListbox.SelectedItem = thumbnailitem;
198
                        //ImgListbox.Items.MoveCurrentTo(thumbnailitem);
199
                        //if (_itemIndex < _thumbnailItems.Count() - 1)
200
                        //    ImgListbox.ScrollIntoView(_itemIndex);
201
                        //else
202
                        //    ImgListbox.ScrollIntoView(this._thumbnailItems.Count() - 1);
203
                    }
204
                }
205
            }
206
            catch(Exception ex)
207
            {
208
                Logger.sendResLog("GotoPage", ex.Message, 0);
209
            }
210
        }
211

    
212
        /// <summary>
213
        /// 주어진 페이지로 변경한다
214
        /// </summary>
215
        /// <param name="iPageNo">변경할 페이지 번호</param>
216
        public void ChangePage(int iPageNo)
217
        {
218
            var thumbitem = this._thumbnailItems.Where(item => item.PageNumber == iPageNo).FirstOrDefault();
219
            if ((PageChanged != null) && (thumbitem != null))
220
            {
221
                var uri = thumbitem.PageUri.ToString();
222
                    //_DefaultUri.Replace("{PageNo}", thumbitem.PageNumber.ToString());
223

    
224
                var _DocPages = _PageList.Where(p => p.PAGE_NUMBER == thumbitem.PageNumber).FirstOrDefault();
225
                if (_DocPages != null)
226
                {
227
                    PageChanged(this, new PageChangeEventArgs
228
                    {
229
                        CurrentPage = _DocPages,
230
                        PageUri = uri,
231
                        PageNumber = thumbitem.PageNumber
232
                    });
233
                    //ImgListbox.SelectedItem = thumbitem;                    
234
                    //ImgListbox.Items.MoveCurrentTo(thumbitem);
235
                    
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
        void user_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
388
        {
389
            SetCommentPages();
390
            //System.Diagnostics.Debug.WriteLine(e.PropertyName);
391
        }
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
            List<SetColorMarkupItem> setColorMarkupItems = new List<SetColorMarkupItem>();
427

    
428
            UsersCommentPagesList.ForEach(user =>
429
            {
430
                user.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(user_PropertyChanged);
431
                user.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(user_PropertyChanged);
432

    
433
                var _commLst = _UsersCommentPagesList.Where(o => o.MarkupInfoID == user.MarkupInfoID);
434

    
435
                if (_commLst.Count() == 0)
436
                {
437
                    _UsersCommentPagesList.Add(user);
438
                }
439
                else
440
                {
441
                    if (_commLst.First().PageNumber != user.PageNumber)
442
                        _commLst.First().PageNumber = user.PageNumber;
443
                }
444

    
445
                user.PageNumber.ForEach(page =>
446
                {
447
                    var _items = this._thumbnailItems.Where(item => item.PageNumber == page);
448

    
449
                    if (_items.Count() > 0)
450
                    {
451
                        setColorMarkupItems.Add(new SetColorMarkupItem { DisplayColor = user.SetColor, markupID = user.MarkupInfoID, Page = page });
452
                        
453
                    }
454
                        
455
                });
456
            });
457

    
458
            foreach (var item in this._thumbnailItems)
459
            {
460
                item.DisplayColorItems = setColorMarkupItems.Where(color => color.Page == item.PageNumber).ToList();
461
            }
462
            
463
            Logger.sendCheckLog("SetCommentList_SelectComment.ItemsSource 설정", 1);
464
            var data = _UsersCommentPagesList.OrderByDescending(p => p.isConSolidation == Convert.ToInt32(true)).ToList();
465
            if (data.Count() != 0)
466
            {
467
                if (Convert.ToBoolean(data.First().isConSolidation))
468
                {
469
                    data.Where(p => p.isConSolidation == Convert.ToInt32(true)).FirstOrDefault().UserName = "Consolidated";
470
                    data.Where(p => p.isConSolidation == Convert.ToInt32(true)).FirstOrDefault().Depart = "";
471
                    this.lstSelectComment.ItemsSource = data;
472
                }
473
                else
474
                {
475
                    this.lstSelectComment.ItemsSource = _UsersCommentPagesList;  //섬네일   
476
                }
477
            }
478
            else
479
            {
480
                this.lstSelectComment.ItemsSource = _UsersCommentPagesList;  //섬네일   
481
            }
482
            
483
            Logger.sendCheckLog("SetComme6ntList_ImgListbox 설정", 1);
484

    
485
            //var template = this.ImgListbox.ItemTemplate;
486
            //this.ImgListbox.ItemTemplate = null;
487
            //this.ImgListbox.ItemTemplate = template;
488

    
489
        }
490

    
491
        private void ThumbnailSet()
492
        {
493
            Logger.sendCheckLog("ThumbnailSet", 1);
494
            if (!_Initialize) return;
495

    
496
            this._thumbnailItems = new ObservableCollection<ThumbnailItem>();
497
            List<int> _selectComment = new List<int>();
498
            if (this.lstSelectComment.ItemsSource != null)
499
            {
500
                var _pages = from commentPage in this.lstSelectComment.ItemsSource.Cast<UsersCommentPagesMember>()
501
                             where commentPage.IsSelected == true
502
                             select commentPage.PageNumber;
503

    
504
                foreach (var item in _pages)
505
                {
506
                    item.ForEach(pp => _selectComment.Add(pp));
507
                }
508

    
509
                _selectComment.Distinct();
510
            }
511

    
512
            var uri = _DefaultUri.Replace("{0}/{1}_{2}", "8/0_0");
513
            this._PageList = this._PageList.OrderBy(data => data.PAGE_NUMBER).ToList();
514
            //this._PageList.ForEach(page =>
515
            ViewerDataModel.Instance.Document_Info.OrderBy(data => data.PAGE_NUMBER).ToList().ForEach(page =>
516
            {
517
                var _pageNo = page.PAGE_NUMBER;
518
                bool _addFlag = false;
519

    
520
                if (rdoFavoritePages.IsChecked == false)
521
                {
522
                    if (_selectComment.Count() > 0)
523
                    {
524
                        if ((rdoAllPages.IsChecked == true)
525
                            || (expCommentPages.IsExpanded == true && _selectComment.Where(s => s == _pageNo).Count() > 0))
526
                        {
527
                            _addFlag = true;
528
                        }
529
                    }
530
                    else
531
                    {
532
                        //if (App.ViewInfo.IsCustomPage)
533
                        //{
534
                        //    //_addFlag = false;
535

    
536
                        //    //App.ViewInfo.IsCustomPage = false;
537
                        //    //this.rdoAllPages.Visibility = System.Windows.Visibility.Collapsed;
538
                        //    //this.lstSelectComment.Visibility = System.Windows.Visibility.Collapsed;
539
                        //    this.rdoAllPages.IsChecked = false;
540
                        //    this.rdoFavoritePages.IsChecked = true;
541
                        //    //SetCommentPages();                        
542
                        //}
543
                        //else
544
                        //{
545
                        _addFlag = true;
546
                        //}
547
                    }
548
                }
549

    
550

    
551
                if (_addFlag)
552
                {
553
                    this._thumbnailItems.Add(new ThumbnailItem
554
                    {
555
                        ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())),
556
                        PageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString()).Replace("jpg","png")),
557
                        PageNumber = _pageNo,
558
                        Angle = page.PAGE_ANGLE,
559
                    });
560
                }
561
                else
562
                {
563
                    if ((rdoFavoritePages.IsChecked == true) && _FavoriteSet.Where(data => data.PAGE_NO == _pageNo).FirstOrDefault() != null)
564
                    {
565
                        this._thumbnailItems.Add(new ThumbnailItem
566
                        {
567
                            ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())),
568
                            PageNumber = _pageNo,
569
                            Angle = page.PAGE_ANGLE,
570
                        });
571
                    }
572
                }
573

    
574

    
575

    
576
                //this._thumbnailItems.Add(new ThumbnailItem
577
                //{
578
                //    ImageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString())),
579

    
580
                //    //ImageUri = new Uri(@"http://www.honeyhead.net/Pages/000000/111111/11111111/1.cmp"),
581

    
582
                //    //ImageUri = new Uri(@"https://image.freepik.com/free-vector/abstract-logo-in-flame-shape_1043-44.jpg"),
583
                //    //DisplayColorItems = pageColor,
584
                //    PageNumber = Convert.ToInt32(_pageNo),
585
                //    Angle = Convert.ToInt32(page.PAGE_ANGLE),
586
                //});
587
            });
588

    
589
            //txtTotPageNo.Text = this._PageList.Count().ToString();
590

    
591
            //txtThumbCount.Text = String.Format("Count : {0}", (this._thumbnailItems.Count).ToString());
592

    
593
            if (ImgListbox.ItemsSource == null)
594
            {
595
                ImgListbox.ItemsSource = this._thumbnailItems;
596

    
597
                this._thumbnailItems.ToList().ForEach(data =>
598
                {
599
                    data.Width = ImgListbox.ActualWidth;
600
                    data.Height = ImgListbox.ActualHeight;
601
                });
602

    
603
                if (ImgListbox.Items.Count > 0)
604
                {
605
                    //int StartPageIdx = Convert.ToInt32(App.ViewInfo.StartPage) - 1;
606
                    int StartPageIdx = 1;
607
                    //if (App.ViewInfo.IsCustomPage)
608
                    //{
609
                    //    ImgListbox.SelectedItem = ImgListbox.Items.Where(data => (data as ThumbnailItem).PageNumber == Convert.ToInt32(App.ViewInfo.StartPage)).FirstOrDefault();
610
                    //}
611
                    //else
612
                    //{
613

    
614
                    if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1)
615
                    {
616
                        ImgListbox.SelectedItem = ImgListbox.Items[0];
617
                    }
618
                    else
619
                    {
620
                        ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx];
621
                    }
622
                    //}
623
                }
624
            }
625
            else
626
            {
627
                ImgListbox.UpdateLayout();
628
                ImgListbox.ItemsSource = this._thumbnailItems;
629
            }
630
        }
631

    
632
        private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
633
        {
634
            if (e.ClickCount >= 2)
635
            {
636
                var selectItem = MarkupList.SelectedItem as IKCOM.MarkupItem;
637
                GotoPage(selectItem.PageNumber);
638
                var result = MarkupParser.GetBaseControl(selectItem.Data);
639
                Rect rect = new Rect(new Point(result.StartPoint.X - 100, result.StartPoint.Y - 100), new Point(result.EndPoint.X + 100, result.EndPoint.Y + 100));
640
                this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect);
641
                //bool isGO = false;
642

    
643
                //var imageViewer = this.ParentOfType<KCOM.Views.MainMenu>().imageViewer;
644
                //imageViewer.SizeMode = Leadtools.Windows.Controls.SizeMode.Fit;
645
                //imageViewer.InteractiveMode = Leadtools.Windows.Controls.InteractiveMode.UserRectangle;
646
                //imageViewer.InteractiveUserRectangle += (sen, ea) =>
647
                //{
648
                //    System.Diagnostics.Debug.WriteLine(ea.Bounds);
649
                //    if (ea.Status == Leadtools.Windows.Controls.InteractiveModeStatus.End)
650
                //    {
651
                //        this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(ea.Bounds);                        
652
                //    }
653

    
654
                //};
655
                //imageViewer.SizeMode = Leadtools.Windows.Controls.SizeMode.Normal;
656

    
657
                //GotoPage(MarkupList.SelectedItem as MarkupList)
658
            }
659
        }
660

    
661
        private void commentUser_SelectionChanged(object sender, SelectionChangedEventArgs e)
662
        {
663
            MarkupList.ItemsSource = null;
664
            tbSearch.Text = string.Empty;
665

    
666
            List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
667

    
668
            if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); }
669

    
670
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); }
671

    
672
            if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); }
673

    
674
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
675
        }
676

    
677
        public class MarkupInfoItemSmall
678
        {
679
            public string Id { get; set; }
680
            public string UserName { get; set; }
681
            public string UserID { get; set; }
682
            public int PageNumber { get; set; }
683
            public string Data { get; set; }
684
            public int Data_Type { get; set; }
685
        }
686

    
687
        private List<MarkupInfoItemSmall> _MarkupInfoSmallList { get; set; }
688
        public List<MarkupInfoItemSmall> MarkupInfoSmallList
689
        {
690
            get
691
            {
692
                if (_MarkupInfoSmallList == null)
693
                {
694
                    _MarkupInfoSmallList = new List<MarkupInfoItemSmall>();
695
                }
696
                return _MarkupInfoSmallList;
697
            }
698
            set
699
            {
700

    
701
                _MarkupInfoSmallList = value;
702
                RaisePropertyChanged("MarkupInfoSmallList");
703
            }
704
        }
705

    
706
        /// <summary>
707
        /// goto page and select item selected by user
708
        /// </summary>
709
        /// <param name="sender"></param>
710
        /// <param name="e"></param>
711
        private void RadButton_Click(object sender, RoutedEventArgs e)
712
        {
713
            var clickButtonItem = sender as RadButton;
714
            if (clickButtonItem != null && clickButtonItem.CommandParameter != null)
715
            {
716
                try
717
                {
718
                    Rect rect = new Rect();
719
                    Point s_point = new Point();
720
                    Point e_point = new Point();
721

    
722
                    MarkupInfoItemSmall gaza = clickButtonItem.CommandParameter as MarkupInfoItemSmall;
723
                    GotoPage(Convert.ToInt32(gaza.PageNumber));
724

    
725
                    var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(gaza.Data.ToString()); //언패킹작업
726
                    switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), gaza.Data_Type.ToString()))
727
                    {
728
                        case MarkupToPDF.Controls.Common.ControlType.TextControl:
729
                            {
730
                                MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data);
731
                                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));
732
                            }
733
                            break;
734
                        case MarkupToPDF.Controls.Common.ControlType.TextBorder:
735
                            {
736
                                MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data);
737
                                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));
738
                            }
739
                            break;
740
                        case MarkupToPDF.Controls.Common.ControlType.TextCloud:
741
                            {
742
                                MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data);
743
                                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));
744
                            }
745
                            break;
746
                        case MarkupToPDF.Controls.Common.ControlType.PolygonControl:
747
                            {
748
                                MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data);
749

    
750
                                foreach (Point A in instance.PointSet)
751
                                {
752
                                    if (s_point == new Point())
753
                                    {
754
                                        s_point = A;
755
                                        e_point = A;
756
                                    }
757
                                    s_point.X = Math.Min(s_point.X, A.X);
758
                                    s_point.Y = Math.Min(s_point.Y, A.Y);
759
                                    e_point.X = Math.Max(e_point.X, A.X);
760
                                    e_point.Y = Math.Max(e_point.Y, A.Y);
761
                                }
762
                                rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100));
763
                            }
764
                            break;
765
                        case MarkupToPDF.Controls.Common.ControlType.PolygonCloud:
766
                            {
767
                                MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data);
768

    
769
                                foreach (Point A in instance.PointSet)
770
                                {
771
                                    if (s_point == new Point())
772
                                    {
773
                                        s_point = A;
774
                                        e_point = A;
775
                                    }
776
                                    s_point.X = Math.Min(s_point.X, A.X);
777
                                    s_point.Y = Math.Min(s_point.Y, A.Y);
778
                                    e_point.X = Math.Max(e_point.X, A.X);
779
                                    e_point.Y = Math.Max(e_point.Y, A.Y);
780
                                }
781
                                rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100));
782
                            }
783
                            break;
784
                        case MarkupToPDF.Controls.Common.ControlType.ChainLine:
785
                            {
786
                                MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data);
787

    
788
                                foreach (Point A in instance.PointSet)
789
                                {
790
                                    if (s_point == new Point())
791
                                    {
792
                                        s_point = A;
793
                                        e_point = A;
794
                                    }
795
                                    s_point.X = Math.Min(s_point.X, A.X);
796
                                    s_point.Y = Math.Min(s_point.Y, A.Y);
797
                                    e_point.X = Math.Max(e_point.X, A.X);
798
                                    e_point.Y = Math.Max(e_point.Y, A.Y);
799
                                }
800
                                rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100));
801
                            }
802
                            break;
803
                        case MarkupToPDF.Controls.Common.ControlType.Ink:
804
                            {
805
                                MarkupToPDF.Serialize.S_Control.S_BaseControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data);
806

    
807
                                foreach (Point A in instance.PointSet)
808
                                {
809
                                    if (s_point == new Point())
810
                                    {
811
                                        s_point = A;
812
                                        e_point = A;
813
                                    }
814
                                    s_point.X = Math.Min(s_point.X, A.X);
815
                                    s_point.Y = Math.Min(s_point.Y, A.Y);
816
                                    e_point.X = Math.Max(e_point.X, A.X);
817
                                    e_point.Y = Math.Max(e_point.Y, A.Y);
818
                                }
819
                                rect = new Rect(new Point(s_point.X - 100, s_point.Y - 100), new Point(e_point.X + 100, e_point.Y + 100));
820
                            }
821
                            break;
822
                        default:
823
                            MarkupToPDF.Serialize.S_Control.S_BaseControl item = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_BaseControl>(data);
824
                            rect = new Rect(new Point(item.StartPoint.X - 100, item.StartPoint.Y - 100), new Point(item.EndPoint.X + 100, item.EndPoint.Y + 100));
825
                            break;
826
                    }
827

    
828
                    SelectionSet.Instance.SelectItemByRect(rect, this.ParentOfType<KCOM.Views.MainMenu>());
829
                    this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect);
830
                }
831
                catch (Exception ex)
832
                {
833
                    this.ParentOfType<KCOM.Views.MainMenu>().DialogMessage_Alert(ex.Message, "Error");
834
                }
835
            }
836
        }
837

    
838
        private void MarkupList_Loaded(object sender, RoutedEventArgs e)
839
        {
840
            if (MarkupInfoSmallList.Count == 0)
841
            {
842
                ViewerDataModel.Instance._markupInfoList.ToList().ForEach(d =>
843
                {
844
                    if (d.MarkupList != null)
845
                    {
846
                        d.MarkupList.ForEach(b =>
847
                        {
848
                            MarkupInfoSmallList.Add(new MarkupInfoItemSmall
849
                            {
850
                                Id = b.ID,
851
                                Data = b.Data,
852
                                Data_Type = b.Data_Type,
853
                                PageNumber = b.PageNumber,
854
                                UserID = d.UserID,
855
                                UserName = d.UserName,
856
                            });
857
                        });
858
                    }
859
                });
860
                MarkupList.ItemsSource = null;
861
                MarkupList.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
862

    
863
                commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
864
                commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
865
            }
866
        }
867

    
868
        public void MarkupListUpdate(MarkupReturn res, Event_Type eventType, string CommentID, MarkupInfoItem item)
869
        {
870
            if (MarkupInfoSmallList.Count == 0)
871
            {
872
                ViewerDataModel.Instance._markupInfoList.ToList().ForEach(d =>
873
                {
874
                    if (d.MarkupList != null)
875
                    {
876
                        d.MarkupList.ForEach(b =>
877
                        {
878
                            MarkupInfoSmallList.Add(new MarkupInfoItemSmall
879
                            {
880
                                Id = b.ID,
881
                                Data = b.Data,
882
                                Data_Type = b.Data_Type,
883
                                PageNumber = b.PageNumber,
884
                                UserID = d.UserID,
885
                                UserName = d.UserName,
886
                            });
887
                        });
888
                    }
889
                });
890
                MarkupList.ItemsSource = null;
891
                MarkupList.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
892
                commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
893
                commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
894
            }
895

    
896
            switch (eventType)
897
            {
898
                case Event_Type.Create:
899
                    MarkupInfoSmallList.Add(new MarkupInfoItemSmall
900
                    {
901
                        Id = res.CommentID,
902
                        Data = res.ConvertData,
903
                        Data_Type = res.DATA_TYPE,
904
                        PageNumber = CurrentPage.PageNumber,
905
                        UserID = App.ViewInfo.UserID,
906
                        UserName = App.UserName,
907
                    });
908
                    break;
909
                case Event_Type.Delete:
910
                    if(CommentID == null) //user information list delete btn
911
                    {
912
                        foreach (var delItem in item.MarkupList)
913
                        {
914
                            MarkupInfoSmallList.RemoveAll(p => p.Id == delItem.ID);
915
                        }
916
                    }
917
                    else //delete, cut, 
918
                    {
919
                        MarkupInfoSmallList.RemoveAll(p => p.Id.Equals(CommentID));
920
                    }                    
921
                    break;
922
                case Event_Type.Thumb://이동 회전
923
                    MarkupInfoSmallList.RemoveAll(p => p.Id.Equals(res.CommentID));
924
                    MarkupInfoSmallList.Add(new MarkupInfoItemSmall
925
                    {
926
                        Id = res.CommentID,
927
                        Data = res.ConvertData,
928
                        Data_Type = res.DATA_TYPE,
929
                        PageNumber = CurrentPage.PageNumber,
930
                        UserID = App.ViewInfo.UserID,
931
                        UserName = App.UserName,
932
                    });
933
                    break;
934
                default:
935
                    break;
936
            }
937

    
938
            List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
939
            if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); }
940

    
941
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList();                 }            
942

    
943
            if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); }
944

    
945
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();            
946
           
947
            commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
948
            commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();            
949
        }
950

    
951
        private void commentType_SelectionChanged(object sender, SelectionChangedEventArgs e)
952
        {
953
            MarkupList.ItemsSource = null;
954
            tbSearch.Text = string.Empty;
955
            List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
956
            if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); }
957

    
958
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); }
959

    
960
            if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); }
961

    
962
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
963
        }
964

    
965
        private void commentPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
966
        {
967
            MarkupList.ItemsSource = null;
968
            tbSearch.Text = string.Empty;
969

    
970
            List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
971
            if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); }
972

    
973
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); }
974

    
975
            if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); }
976

    
977
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
978
        }
979

    
980
        private void btnPanorama_Click(object sender, RoutedEventArgs e)
981
        {
982
            ViewerDataModel.Instance.SystemMain.dzTopMenu.PanoramaShow();
983
        }
984

    
985
        private void btnSearch_Click(object sender, RoutedEventArgs e)
986
        {
987
            string search_str = tbSearch.Text;
988
            var sel_type = commentType.SelectedItem;
989
            var sel_user = commentUser.SelectedItem;
990
            var sel_page = commentPage.SelectedItem;
991
            List<MarkupInfoItemSmall> small_list = new List<MarkupInfoItemSmall>();
992
            List<MarkupInfoItemSmall> list = MarkupInfoSmallList;
993
            if (sel_page != null)
994
            {
995
                list = list.Where(d => d.PageNumber == Convert.ToInt32(sel_page)).ToList();
996
            }
997
            if (sel_type != null)
998
            {
999
                list = list.Where(d => d.Data_Type == Convert.ToInt32(sel_type)).ToList();
1000
            }
1001
            if (sel_user != null)
1002
            {
1003
                list = list.Where(d => d.UserID == (sel_user as MarkupInfoItem).UserID).ToList();
1004
            }
1005
            foreach (var item in list)
1006
            {
1007
                var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(item.Data.ToString());
1008

    
1009
                switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), item.Data_Type.ToString()))
1010
                {
1011
                    case MarkupToPDF.Controls.Common.ControlType.TextControl:
1012
                    case MarkupToPDF.Controls.Common.ControlType.TextBorder:
1013
                    case MarkupToPDF.Controls.Common.ControlType.TextCloud:
1014
                        {
1015
                            MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data);
1016
                            if (instance.Text.Contains(search_str))
1017
                            {
1018
                                small_list.Add(item);
1019
                            }
1020
                        }
1021
                        break;
1022
                    case MarkupToPDF.Controls.Common.ControlType.ArrowTextBorderControl:
1023
                    case MarkupToPDF.Controls.Common.ControlType.ArrowTextCloudControl:
1024
                    case MarkupToPDF.Controls.Common.ControlType.ArrowTextControl:
1025
                    case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextBorderControl:
1026
                    case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextCloudControl:
1027
                    case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextControl:
1028
                        {
1029
                            MarkupToPDF.Serialize.S_Control.S_ArrowTextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_ArrowTextControl>(data);
1030
                            if (instance.ArrowText.Contains(search_str))
1031
                            {
1032
                                small_list.Add(item);
1033
                            }
1034
                        }
1035
                        break;
1036
                }
1037
            }
1038

    
1039
            MarkupList.ItemsSource = null;
1040
            MarkupList.ItemsSource = small_list.OrderBy(d => d.PageNumber).ToList();
1041
            tbSearch.Text = string.Empty;
1042
        }
1043
    }
1044
}
클립보드 이미지 추가 (최대 크기: 500 MB)