프로젝트

일반

사용자정보

개정판 90e7968d

ID90e7968da9d5053a78b4cb08170ebddef4a62fad
상위 6c8c6f91
하위 beb36e17, 9322ec12

이지연이(가) 5년 이상 전에 추가함

issue #000: daelim source compare 중

Change-Id: I010a1b75dae4b786e1c2a51a34c923eafd384667

차이점 보기:

KCOM/Controls/Sample.xaml.cs
26 26
            //InitializeComponent();            
27 27
            this.Loaded += Sample_Loaded;
28 28
            //_Initialize = true;
29
            
29

  
30 30
            //lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged);
31 31
            //ImgListbox.MouseDoubleClick += ImgListbox_MouseDoubleClick;
32 32
        }
......
41 41

  
42 42
            _Initialize = true;
43 43
            lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged);
44
            
44

  
45 45
        }
46 46

  
47 47
        //private void ImgListbox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
......
117 117
            if (rdoFavoritePages.IsChecked == true)
118 118
                expCommentPages.IsExpanded = false;
119 119

  
120
            _FavoriteSet = _FavoriteSet == null ? new List<FAVORITE_DOC>() : _FavoriteSet; 
120
            _FavoriteSet = _FavoriteSet == null ? new List<FAVORITE_DOC>() : _FavoriteSet;
121 121
            if (_FavoriteSet.Count > 0)
122 122
            {
123 123
                SetCommentPages_Favorite(); //수정    
......
131 131

  
132 132
        private void SetCommentPages_Favorite()
133 133
        {
134
            ThumbnailSet();
135
            //_UsersCommentPagesList
136
            //var result = (from A in _UsersCommentPagesList
137
            //              from B in _FavoriteSet
138
            //              where A.PageNumber.Contains(B.PageNo)
139
            //              select A).ToList();
140
            //_UsersCommentPagesList = result;
141

  
134
            ThumbnailSet();            
142 135
            SetCommentPages();
143

  
144 136
        }
145 137

  
146 138
        void expCommentPages_PreviewCollapsed(object sender, Telerik.Windows.RadRoutedEventArgs e)
......
189 181
        /// <param name="_pageNumber"></param>
190 182
        public void GotoPage(int _pageNumber)
191 183
        {
192
            int _PageNo = -1;
193
            if (int.TryParse(_pageNumber.ToString(), out _PageNo))
184
            try
194 185
            {
195
                var _page = _thumbnailItems.Where(item => item.PageNumber == _PageNo);
196
                if (_page.Count() > 0)
186
                int _PageNo = -1;
187
                if (int.TryParse(_pageNumber.ToString(), out _PageNo))
197 188
                {
198
                    ThumbnailItem _item = _page.First();
199
                    setPageChange(_item);
200
                    this.ImgListbox.SelectedIndex = _pageNumber - 1;
201
                    this.ImgListbox.ScrollIntoView(_pageNumber - 1);
189
                    var _page = _thumbnailItems.Where(item => item.PageNumber == _PageNo);
190
                    if (_page.Count() > 0)
191
                    {
192
                        ThumbnailItem _item = _page.First();
193
                        setPageChange(_item);
194
                        this.ImgListbox.SelectedIndex = _pageNumber - 1;
195
                        this.ImgListbox.ScrollIntoView(_pageNumber - 1);
196
                    }
202 197
                }
203 198
            }
204
        }      
199
            catch(Exception ex)
200
            {
201
                Logger.sendResLog("GotoPage", ex.Message, 0);
202
            }
203
            
204
        }
205 205

  
206 206
        public void setPageChange(ThumbnailItem thumbnailItem)
207 207
        {
......
250 250
            if (thumbnailItem != null)
251 251
            {
252 252
                if (PageChanging != null)
253
                {   
254
                    this.CurrentPage = _NextPage;
253
                {
254
                   this.CurrentPage = _NextPage;
255 255
                    _NextPage = thumbnailItem;
256 256
                    PageChanging(this, new PageChangeEventArgs
257 257
                    {
......
266 266

  
267 267
                    if (rotationNum > 0) // 1, 2, 3
268 268
                    {
269
                        for(int i = 0; i < rotationNum; i++)
269
                        for (int i = 0; i < rotationNum; i++)
270 270
                        {
271 271
                            drawingPannelRotate(true);
272 272
                        }
273 273
                    }
274
                    else if(rotationNum < 0)// -1, -2, -3
274
                    else if (rotationNum < 0)// -1, -2, -3
275 275
                    {
276 276
                        for (int i = 0; i < -rotationNum; i++)
277 277
                        {
278 278
                            drawingPannelRotate(false);
279 279
                        }
280
                    }                    
280
                    }
281 281
                }
282 282
            }
283 283
        }
284
     
284

  
285 285
        public void drawingPannelRotate(bool Flag)
286 286
        {
287 287
            var instanceMain = this.ParentOfType<MainWindow>();
......
315 315
                instanceMain.dzMainMenu.zoomAndPanCanvas.Width = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
316 316
                instanceMain.dzMainMenu.zoomAndPanCanvas.Height = emptySize;
317 317
            }
318
        
318

  
319 319
            if (instanceMain.dzMainMenu.rotate.Angle == 0)
320 320
            {
321 321
                instanceMain.dzMainMenu.translate.X = 0;
......
395 395
                var _DocPages = _PageList.Where(p => p.PAGE_NUMBER == thumbitem.PageNumber);
396 396

  
397 397
                if (_DocPages.Count() > 0)
398
                {   
398
                {
399 399
                    var _page = _DocPages.First();
400 400

  
401 401
                    PageChanged(this, new PageChangeEventArgs
......
506 506
            }
507 507
            //this.ImgListbox.ItemsSource = null;
508 508
            Logger.sendCheckLog("SetCommentList_ImgListbox 설정", 1);
509
            this.ImgListbox.ItemsSource = this._thumbnailItems;
510
            var template = this.ImgListbox.ItemTemplate;
511
            this.ImgListbox.ItemTemplate = null;
512
            this.ImgListbox.ItemTemplate = template;
513
            Logger.sendCheckLog("SetCommentList_ImgListbox UpdateLayout", 1);
514
            this.ImgListbox.UpdateLayout();
509

  
510
       
511
                this.ImgListbox.ItemsSource = this._thumbnailItems;
512
                var template = this.ImgListbox.ItemTemplate;
513
                this.ImgListbox.ItemTemplate = null;
514
                this.ImgListbox.ItemTemplate = template;
515
               //Logger.sendCheckLog("SetCommentList_ImgListbox UpdateLayout_Start", 1);
516
                //this.ImgListbox.UpdateLayout();
517
                //Logger.sendCheckLog("SetCommentList_ImgListbox UpdateLayout_End", 1);
518
           
515 519
        }
516 520

  
517 521
        private void ThumbnailSet()
......
574 578
                }
575 579

  
576 580

  
577
                if(_addFlag)
581
                if (_addFlag)
578 582
                {
579 583
                    this._thumbnailItems.Add(new ThumbnailItem
580 584
                    {
......
661 665
                GotoPage(selectItem.PageNumber);
662 666
                MarkupToPDF.Controls.Parsing.LayerControl control = new MarkupToPDF.Controls.Parsing.LayerControl();
663 667
                var result = control.markupParse_GetBaseControl(selectItem.Data);
664
                Rect rect = new Rect(new Point(result.StartPoint.X-100, result.StartPoint.Y-100), new Point(result.EndPoint.X + 100, result.EndPoint.Y + 100));             
668
                Rect rect = new Rect(new Point(result.StartPoint.X - 100, result.StartPoint.Y - 100), new Point(result.EndPoint.X + 100, result.EndPoint.Y + 100));
665 669
                this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect);
666 670
                //bool isGO = false;
667 671

  
......
715 719
                    });
716 720
                    gogogo.ItemsSource = null;
717 721
                    gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
718
                    
719
                }                
722

  
723
                }
720 724
            }
721 725
            else
722 726
            {
......
740 744

  
741 745
                });
742 746
                gogogo.ItemsSource = null;
743
                gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); 
747
                gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
744 748
            }
745 749
        }
746 750

  
......
767 771
            }
768 772
            set
769 773
            {
770
               
774

  
771 775
                _MarkupInfoSmallList = value;
772 776
                RaisePropertyChanged("MarkupInfoSmallList");
773 777
            }
......
904 908
                }
905 909
            }
906 910
        }
907
        public void MarkupListReload()
908
        {
909
            ViewerDataModel.Instance._markupInfoList.ToList().ForEach(d =>
910
            {
911
                if (d.MarkupList != null)
912
                {
913
                    d.MarkupList.ForEach(b =>
914
                    {
915
                        MarkupInfoSmallList.Add(new MarkupInfoItemSmall
916
                        {
917
                            Id = b.ID,
918
                            Data = b.Data,
919
                            Data_Type = b.Data_Type,
920
                            PageNumber = b.PageNumber,
921
                            UserID = d.UserID,
922
                            UserName = d.UserName,
923
                        });
924
                    });
925
                }
926
            });
927
            gogogo.ItemsSource = null;
928
            gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
929 911

  
930
            commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
931
            commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
932
        }
933 912
        private void gogogo_Loaded(object sender, RoutedEventArgs e)
934 913
        {
935 914
            if (MarkupInfoSmallList.Count == 0)
......
955 934
                gogogo.ItemsSource = null;
956 935
                gogogo.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
957 936

  
958
                commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d=>d).ToList();
937
                commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
959 938
                commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
960 939
            }
961 940
        }
......
964 943
        {
965 944
            gogogo.ItemsSource = null;
966 945
            tbSearch.Text = string.Empty;
967
            if (e.AddedItems.Count >0)
946
            if (e.AddedItems.Count > 0)
968 947
            {
969
                
948

  
970 949
                gogogo.ItemsSource = MarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(e.AddedItems[0])).ToList();
971 950
            }
972 951
            else
......
1002 981
            var sel_page = commentPage.SelectedItem;
1003 982
            List<MarkupInfoItemSmall> small_list = new List<MarkupInfoItemSmall>();
1004 983
            List<MarkupInfoItemSmall> list = MarkupInfoSmallList;
1005
            if(sel_page !=null)
984
            if (sel_page != null)
1006 985
            {
1007 986
                list = list.Where(d => d.PageNumber == Convert.ToInt32(sel_page)).ToList();
1008 987
            }
1009
            if(sel_type !=null)
988
            if (sel_type != null)
1010 989
            {
1011 990
                list = list.Where(d => d.Data_Type == Convert.ToInt32(sel_type)).ToList();
1012 991
            }
......
1017 996
            foreach (var item in list)
1018 997
            {
1019 998
                var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(item.Data.ToString());
1020
                
999

  
1021 1000
                switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), item.Data_Type.ToString()))
1022
                {                    
1001
                {
1023 1002
                    case MarkupToPDF.Controls.Common.ControlType.TextControl:
1024 1003
                    case MarkupToPDF.Controls.Common.ControlType.TextBorder:
1025 1004
                    case MarkupToPDF.Controls.Common.ControlType.TextCloud:
1026 1005
                        {
1027 1006
                            MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data);
1028 1007
                            if (instance.Text.Contains(search_str))
1029
                            {                                
1008
                            {
1030 1009
                                small_list.Add(item);
1031 1010
                            }
1032 1011
                        }
......
1045 1024
                            }
1046 1025
                        }
1047 1026
                        break;
1048
                    
1027

  
1049 1028
                }
1050
                
1029

  
1051 1030
            }
1052
            
1031

  
1053 1032
            gogogo.ItemsSource = null;
1054 1033
            gogogo.ItemsSource = small_list.OrderBy(d => d.PageNumber).ToList();
1055 1034
            tbSearch.Text = string.Empty;
1056 1035
        }
1057
        
1058 1036
    }
1059 1037
}

내보내기 Unified diff

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