프로젝트

일반

사용자정보

개정판 2c629eec

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

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

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

Change-Id: I8f8ad8248bc65c3cd37b4b60d24ece0c79cafb59

차이점 보기:

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)

내보내기 Unified diff

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