프로젝트

일반

사용자정보

개정판 2c629eec

ID2c629eec51a77c480dea3a490ecbceeb10587964
상위 0cda2a88
하위 21a46e34, cb412ff8, 65768148

김태성이(가) 약 5년 전에 추가함

issue #20022001: 텍스트 검색 / 마크업 리스트 필터 오류 수정
1. 페이지 이동 비동기로 변경 후 텍스트 검색에서 검색된 다른 페이지의 텍스트로 포커스 이동시 확대 안 되는 현상이 있어 수정
2. 마크업 리스트 필터 오류 수정

Change-Id: I8f8ad8248bc65c3cd37b4b60d24ece0c79cafb59

차이점 보기:

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

  
506 506
        #endregion
507 507

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

  
510 510
        /// <summary>
511 511
        /// 페이지 변경 후 페이지에 해당하는 마크업을 모두 읽었을때 이벤트를 보내도록 한다.
512 512
        /// </summary>
513 513
        public void LoadPageMarkup()
514 514
        {
515
            if(PageMarkupLoaded != null)
515
            if(PageLoaded != null)
516 516
            {
517
                PageMarkupLoaded(this, new EventArgs());
517
                PageLoaded(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" DisplayMemberPath="UserName" ItemsSource="{Binding UsersCommentPagesList, ElementName=userControl}"
545
                                             FontSize="10" Grid.Column="1"
546 546
                                             SelectionChanged="commentFilter_SelectionChanged" ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Show All"
547 547
                                             EmptyText="USER">
548
                                <!--ItemsSource="{Binding UsersCommentPagesList, ElementName=userControl}"-->
548 549
                            </telerik:RadComboBox>
549 550
                            <telerik:RadComboBox EmptyText="PAGE" Grid.Column="2"  HorizontalAlignment="Stretch" Margin="5" DropDownWidth="*" Background="White" BorderBrush="#d6d6d6" x:Name="commentPage"
550 551
                                                  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 (ImgListbox.SelectedItem != null)
166
            if(e.AddedItems.Count > 0)
167 167
            {
168
                int _CurrentPageNo = -1;
169
                if (this.CurrentPage != null)
170
                {
171
                    ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);   /// save controls
168
                var number = (e.AddedItems[0] as KCOM.Common.ThumbnailItem).PageNumber;
172 169

  
173
                    _CurrentPageNo = this.CurrentPage.PageNumber;
174
                }
170
                ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);   /// save controls
175 171

  
176
                this.CurrentPage = ImgListbox.SelectedItem as ThumbnailItem;
177
                int iPageNo = this.CurrentPage.PageNumber;
178
                if(_CurrentPageNo != iPageNo)
172
                this.CurrentPage = e.AddedItems[0] as KCOM.Common.ThumbnailItem;
173

  
174
                PageChanging(this, new PageChangeEventArgs
179 175
                {
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
                }
176
                    CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == number).First(),
177
                    PageNumber = number,
178
                    PageUri = null
179
                });
187 180
            }
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
            //}
188 205

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

  
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();
1083
                FilterUpdate();
1068 1084
            }
1069 1085
        }
1070 1086

  
......
1092 1108
                });
1093 1109
                MarkupList.ItemsSource = null;
1094 1110
                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();
1097 1111
            }
1098 1112

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

  
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();            
1176
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
1177

  
1178
            FilterUpdate();
1166 1179
        }
1167 1180

  
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

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

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

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

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

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

  
1236
            FilterUpdate();
1196 1237
        }
1197 1238

  
1198 1239
        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<Sample.PageChangeEventArgs> handler = null;
353
                        EventHandler<EventArgs> handler = null;
354 354

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

  
361
                        pageNavigator.PageChanged += handler;
361
                        ViewerDataModel.Instance.PageLoaded += 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

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

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

  
62
                    ViewerDataModel.Instance.PageMarkupLoaded += handler;
62
                    ViewerDataModel.Instance.PageLoaded += 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
            // 마크업 로드
644 645
            await this.Dispatcher.InvokeAsync(()=>MarkupLoad(e.PageNumber));
645 646

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

  
......
671 673

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

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

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

  

내보내기 Unified diff

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