프로젝트

일반

사용자정보

개정판 65768148

ID657681480ca5c061b63c245785912ea405004648
상위 2c629eec
하위 6d3d7aff

임예철이(가) 약 5년 전에 추가함

Revert "issue #20022001: 텍스트 검색 / 마크업 리스트 필터 오류 수정"

This reverts commit 2c629eec51a77c480dea3a490ecbceeb10587964.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I019121c484b36a8f55d859b86a3a7b3a7123ca0c

차이점 보기:

ConvertService/ServiceBase/Markus.Service.Station/StationService/ServiceStationWCF.cs
159 159
                            }
160 160
                            else
161 161
                            {
162
                                PassConvertItem(ProjectNo, convertID, convertItem.UniqueKey);
163
                     
164 162
                                logger.Info($"ConvertAdd  ConvertProcess Wait ProcessCount ProjectNo:{ProjectNo} convertID:{convertID} ");
165 163
                                result = true.ToString();
166 164
                            }
167 165
                        }
168 166
                        else
169 167
                        {
168
                            PassConvertItem(ProjectNo, convertID, convertItem.UniqueKey);
170 169
                            result = true.ToString();
171 170
                        }
172 171
                    }
KCOM/Common/ViewerDataModel.cs
505 505

  
506 506
        #endregion
507 507

  
508
        public event EventHandler<EventArgs> PageLoaded;
508
        public event EventHandler<EventArgs> PageMarkupLoaded;
509 509

  
510 510
        /// <summary>
511 511
        /// 페이지 변경 후 페이지에 해당하는 마크업을 모두 읽었을때 이벤트를 보내도록 한다.
512 512
        /// </summary>
513 513
        public void LoadPageMarkup()
514 514
        {
515
            if(PageLoaded != null)
515
            if(PageMarkupLoaded != null)
516 516
            {
517
                PageLoaded(this, new EventArgs());
517
                PageMarkupLoaded(this, new EventArgs());
518 518
            }
519 519
        }
520 520

  
KCOM/Controls/Sample.xaml
542 542
                                </telerik:RadComboBox.ItemTemplate>
543 543
                            </telerik:RadComboBox>
544 544
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Margin="5" DropDownWidth="*" Background="White" BorderBrush="#d6d6d6" x:Name="commentUser"
545
                                             FontSize="10" Grid.Column="1"
545
                                             FontSize="10" Grid.Column="1" DisplayMemberPath="UserName" ItemsSource="{Binding UsersCommentPagesList, ElementName=userControl}"
546 546
                                             SelectionChanged="commentFilter_SelectionChanged" ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Show All"
547 547
                                             EmptyText="USER">
548
                                <!--ItemsSource="{Binding UsersCommentPagesList, ElementName=userControl}"-->
549 548
                            </telerik:RadComboBox>
550 549
                            <telerik:RadComboBox EmptyText="PAGE" Grid.Column="2"  HorizontalAlignment="Stretch" Margin="5" DropDownWidth="*" Background="White" BorderBrush="#d6d6d6" x:Name="commentPage"
551 550
                                                  ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Show All" SelectionChanged="commentFilter_SelectionChanged"/>
KCOM/Controls/Sample.xaml.cs
163 163
        /// <param name="e"></param>
164 164
        private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
165 165
        {
166
            if(e.AddedItems.Count > 0)
166
            if (ImgListbox.SelectedItem != null)
167 167
            {
168
                var number = (e.AddedItems[0] as KCOM.Common.ThumbnailItem).PageNumber;
169

  
170
                ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);   /// save controls
168
                int _CurrentPageNo = -1;
169
                if (this.CurrentPage != null)
170
                {
171
                    ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);   /// save controls
171 172

  
172
                this.CurrentPage = e.AddedItems[0] as KCOM.Common.ThumbnailItem;
173
                    _CurrentPageNo = this.CurrentPage.PageNumber;
174
                }
173 175

  
174
                PageChanging(this, new PageChangeEventArgs
176
                this.CurrentPage = ImgListbox.SelectedItem as ThumbnailItem;
177
                int iPageNo = this.CurrentPage.PageNumber;
178
                if(_CurrentPageNo != iPageNo)
175 179
                {
176
                    CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == number).First(),
177
                    PageNumber = number,
178
                    PageUri = null
179
                });
180
                    PageChanging(this, new PageChangeEventArgs
181
                    {
182
                        CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == iPageNo).First(),
183
                        PageNumber = iPageNo,
184
                        PageUri = null
185
                    });
186
                }
180 187
            }
181
            
182

  
183
            //if (ImgListbox.SelectedItem != null)
184
            //{
185
            //    int _CurrentPageNo = -1;
186
            //    if (this.CurrentPage != null)
187
            //    {
188
            //        ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);   /// save controls
189

  
190
            //        _CurrentPageNo = this.CurrentPage.PageNumber;
191
            //    }
192

  
193
            //    this.CurrentPage = ImgListbox.SelectedItem as ThumbnailItem;
194
            //    int iPageNo = this.CurrentPage.PageNumber;
195
            //    if(_CurrentPageNo != iPageNo)
196
            //    {
197
            //        PageChanging(this, new PageChangeEventArgs
198
            //        {
199
            //            CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == iPageNo).First(),
200
            //            PageNumber = iPageNo,
201
            //            PageUri = null
202
            //        });
203
            //    }
204
            //}
205 188

  
206 189
            //var border = VisualTreeHelper.GetChild(ImgListbox, 0);
207 190
            //if (border != null)
......
1080 1063
                MarkupList.ItemsSource = null;
1081 1064
                MarkupList.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
1082 1065

  
1083
                FilterUpdate();
1066
                commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
1067
                commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
1084 1068
            }
1085 1069
        }
1086 1070

  
......
1108 1092
                });
1109 1093
                MarkupList.ItemsSource = null;
1110 1094
                MarkupList.ItemsSource = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
1095
                commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
1096
                commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
1111 1097
            }
1112 1098

  
1113 1099
            switch (eventType)
......
1173 1159
                                 .WhereIf(UserId != null, d => d.UserName == ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).ToString())
1174 1160
                                 .WhereIf(commentPage.SelectedValue != null, d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue));
1175 1161

  
1176
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
1177

  
1178
            FilterUpdate();
1162
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();            
1163
           
1164
            commentType.ItemsSource = MarkupInfoSmallList.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
1165
            commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();            
1179 1166
        }
1180 1167

  
1181
        private void FilterUpdate(string selectUser = null)
1182
        {
1183
            //var items = MarkupList.ItemsSource as List<MarkupInfoItemSmall>;
1184

  
1185
            //commentType.ItemsSource = items.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
1186
            //commentPage.ItemsSource = items.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
1187

  
1188

  
1189
            var items = MarkupList.ItemsSource as List<MarkupInfoItemSmall>;
1190
 
1191
            var filterUsers = MarkupInfoSmallList.WhereIf(commentType.SelectedValue != null, d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue))
1192
                                   .WhereIf(commentPage.SelectedValue != null, d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue));
1193

  
1194
            var filterTypes = MarkupInfoSmallList.WhereIf(selectUser != null, d => d.UserName == selectUser)
1195
                                .WhereIf(commentPage.SelectedValue != null, d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue));
1196

  
1197
            var filterPages = MarkupInfoSmallList.WhereIf(commentType.SelectedValue != null, d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue))
1198
                              .WhereIf(selectUser != null, d => d.UserName == selectUser);
1199

  
1200
            commentUser.ItemsSource = filterUsers.Select(d => d.UserName).Distinct().OrderBy(d => d).ToList();
1201
            commentType.ItemsSource = filterTypes.Select(d => d.Data_Type).Distinct().OrderBy(d => d).ToList();
1202
            commentPage.ItemsSource = filterPages.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();
1203
        }
1204

  
1205
        
1206

  
1207 1168
        private void commentFilter_SelectionChanged(object sender, SelectionChangedEventArgs e)
1208 1169
        {
1209 1170
            MarkupList.ItemsSource = null;
......
1212 1173
            List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
1213 1174

  
1214 1175
            bool IsConsolidation = false;
1215
            string userName = null;
1176
            string UserId = null;
1216 1177

  
1217 1178
            if (commentUser.SelectedValue != null)
1218 1179
            {
1219
                if(commentUser.SelectedValue?.ToString() != "Consolidated")
1180
                if(((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName != "Consolidated")
1220 1181
                {
1221
                    userName = commentUser.SelectedValue.ToString();
1182
                    UserId = ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName;
1222 1183
                }
1223 1184
                else
1224 1185
                {
......
1227 1188
            }
1228 1189

  
1229 1190
            var filterItems = TempMarkupInfoSmallList.WhereIf(commentType.SelectedValue != null, d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue))
1230
                                   .WhereIf(userName != null, d => d.UserName == userName)
1191
                                   .WhereIf(UserId != null, d => d.UserName == UserId)
1231 1192
                                   .WhereIf(IsConsolidation,d=>d.IsConsolidate == IsConsolidation)
1232 1193
                                   .WhereIf(commentPage.SelectedValue != null, d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue));
1233 1194

  
1234 1195
            MarkupList.ItemsSource = filterItems.OrderBy(d => d.PageNumber).ToList();
1235

  
1236
            FilterUpdate();
1237 1196
        }
1238 1197

  
1239 1198
        private void btnPanorama_Click(object sender, RoutedEventArgs e)
KCOM/Controls/SearchPanel.xaml.cs
350 350
                    {
351 351
                        var pageNavigator = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator;
352 352

  
353
                        EventHandler<EventArgs> handler = null;
353
                        EventHandler<Sample.PageChangeEventArgs> handler = null;
354 354

  
355 355
                        handler = (snd, evt) =>
356 356
                        {
357 357
                            GotoPosition(item);
358
                            ViewerDataModel.Instance.PageLoaded -= handler;
358
                            pageNavigator.PageChanged -= handler;
359 359
                        };
360 360

  
361
                        ViewerDataModel.Instance.PageLoaded += handler;
361
                        pageNavigator.PageChanged += handler;
362 362
                        pageNavigator.GotoPage(item.PageNo);
363 363

  
364 364
                    }
KCOM/Events/SaveCommand.cs
103 103
                    mainmenu.MarkupitemViewUpdate(UserState.MarkupInfoID);
104 104
                }
105 105
                //User Information List Rebind
106

  
107 106
                mainmenu.gridViewMarkup.Rebind();
108 107
                TempFile.Remove(); //임시파일삭제                
109

  
110 108
            }
111 109
            catch (Exception)
112 110
            {
KCOM/Extensions/MarkupVisitHelper.cs
56 56
                    handler = (snd, evt) =>
57 57
                    {
58 58
                        GotoSelectedMarkup(CommentIdList);
59
                        ViewerDataModel.Instance.PageLoaded -= handler;
59
                        ViewerDataModel.Instance.PageMarkupLoaded -= handler;
60 60
                    };
61 61

  
62
                    ViewerDataModel.Instance.PageLoaded += handler;
62
                    ViewerDataModel.Instance.PageMarkupLoaded += handler;
63 63

  
64 64
                    pageNavigator.GotoPage(commentList.First().PageNumber);
65 65
                }
KCOM/Views/MainMenu.xaml
541 541
                        </Grid>
542 542

  
543 543
                    </telerik:RadPane>
544
                    <!--<telerik:RadPane Header="test" CanFloat="False" telerik:RadDocking.FloatingSize="50,NaN" CanUserClose="False" CanUserPin="True"
544
                    <telerik:RadPane Header="test" CanFloat="False" telerik:RadDocking.FloatingSize="50,NaN" CanUserClose="False" CanUserPin="True"
545 545
                                     ContextMenuTemplate="{x:Null}" PaneHeaderVisibility="Visible" telerik:StyleManager.Theme="Office2016">
546 546

  
547 547
                        <Grid    xmlns:drag="clr-namespace:Telerik.Windows.DragDrop.Behaviors;assembly=Telerik.Windows.Controls" >
......
560 560
                            </telerik:RadListBox>
561 561
                        </Grid>
562 562

  
563
                    </telerik:RadPane>-->
563
                    </telerik:RadPane>
564 564

  
565 565
                </telerik:RadPaneGroup>
566 566
            </telerik:RadSplitContainer>
KCOM/Views/MainMenu.xaml.cs
247 247
            //App.splashString(ISplashMessage.MAINMENU_0);            
248 248
           InitializeComponent();
249 249

  
250
            //List<testItem> testItems = new List<testItem>
251
            //{
252
            //    new testItem{Title = "test1"},
253
            //    new testItem{Title = "test2"},
254
            //    new testItem{Title = "test3"},
255
            //    new testItem{Title = "test4"},
256
            //};
250
            List<testItem> testItems = new List<testItem>
251
            {
252
                new testItem{Title = "test1"},
253
                new testItem{Title = "test2"},
254
                new testItem{Title = "test3"},
255
                new testItem{Title = "test4"},
256
            };
257 257

  
258
            //lstSymbolPrivate.ItemsSource = testItems;
258
            lstSymbolPrivate.ItemsSource = testItems;
259 259

  
260 260
            this.Loaded += MainMenu_Loaded;
261 261
        }
......
639 639
        /// <param name="e"></param>
640 640
        private async void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
641 641
        {
642
            //await Task.Delay(300);
642
            await Task.Delay(300);
643 643

  
644
            // 마크업 로드
645 644
            await this.Dispatcher.InvokeAsync(()=>MarkupLoad(e.PageNumber));
646 645

  
647
            // 페이지 이미지 변경
648 646
            await PageChangingAsync(e.CurrentPage, e.PageNumber);
649 647
        }
650 648

  
......
673 671

  
674 672
            var pageWidth = Convert.ToDouble(currentPage.PAGE_WIDTH);
675 673
            var pageHeight = Convert.ToDouble(currentPage.PAGE_HEIGHT);
674
            var pageUri = pageNavigator.CurrentPage.PageUri;
676 675
            var contentScale = zoomAndPanControl.ContentScale;
677 676

  
678 677
            #region 페이지 이미지 로딩 수정
679 678

  
680
            ViewerDataModel.Instance.ImageViewPath = await App.PageStorage.GetPageAsync(changePageNumber);
679
            ViewerDataModel.Instance.ImageViewPath = await App.PageStorage.GetPageAsync(pageNavigator.CurrentPage.PageNumber);
681 680
       
682 681
            ScaleImage(pageWidth, pageHeight);
683 682

  

내보내기 Unified diff

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