프로젝트

일반

사용자정보

개정판 65768148

ID657681480ca5c061b63c245785912ea405004648
상위 2c629eec
하위 6d3d7aff

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

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

This reverts commit 2c629eec51a77c480dea3a490ecbceeb10587964.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I019121c484b36a8f55d859b86a3a7b3a7123ca0c

차이점 보기:

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)

내보내기 Unified diff

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