개정판 2c3eae15
Revert "markus 성능개선"
This reverts commit 0cda2a885008c0503d20d124631932685c72d462.
Reason for revert: <INSERT REASONING HERE>
Change-Id: I2978dc7ed08980980dabf724d9249b73c5dba72d
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
162 | 162 |
/// <param name="sender"></param> |
163 | 163 |
/// <param name="e"></param> |
164 | 164 |
private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
165 |
{ |
|
165 |
{
|
|
166 | 166 |
if (ImgListbox.SelectedItem != null) |
167 | 167 |
{ |
168 | 168 |
int _CurrentPageNo = -1; |
169 | 169 |
if (this.CurrentPage != null) |
170 | 170 |
{ |
171 |
ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null); /// save controls |
|
172 |
|
|
171 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); /// save controls |
|
173 | 172 |
_CurrentPageNo = this.CurrentPage.PageNumber; |
174 | 173 |
} |
175 | 174 |
|
... | ... | |
687 | 686 |
} |
688 | 687 |
} |
689 | 688 |
|
689 |
private void commentUser_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|
690 |
{ |
|
691 |
MarkupList.ItemsSource = null; |
|
692 |
txtSearch.Text = string.Empty; |
|
693 |
|
|
694 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
|
695 |
|
|
696 |
if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); } |
|
697 |
|
|
698 |
if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName).ToList(); } |
|
699 |
|
|
700 |
if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); } |
|
701 |
|
|
702 |
MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
|
703 |
} |
|
704 |
|
|
690 | 705 |
public class MarkupInfoItemSmall |
691 | 706 |
{ |
692 | 707 |
public string Id { get; set; } |
... | ... | |
695 | 710 |
public int PageNumber { get; set; } |
696 | 711 |
public string Data { get; set; } |
697 | 712 |
public int Data_Type { get; set; } |
698 |
public bool IsConsolidate { get; set; } |
|
699 | 713 |
} |
700 | 714 |
|
701 | 715 |
private List<MarkupInfoItemSmall> _MarkupInfoSmallList { get; set; } |
... | ... | |
1037 | 1051 |
{ |
1038 | 1052 |
d.MarkupList.ForEach(b => |
1039 | 1053 |
{ |
1040 |
bool isConsolidate = false; |
|
1041 |
|
|
1042 |
if(d.Consolidate == 1 && d.AvoidConsolidate == 0) |
|
1043 |
{ |
|
1044 |
isConsolidate = true; |
|
1045 |
} |
|
1046 |
|
|
1047 |
System.Diagnostics.Debug.WriteLine($"UserID : {d.UserID} Consolidate : {d.Consolidate} AvoidConsolidate : {d.AvoidConsolidate}"); |
|
1048 |
|
|
1049 | 1054 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
1050 | 1055 |
{ |
1051 | 1056 |
Id = b.ID, |
... | ... | |
1054 | 1059 |
PageNumber = b.PageNumber, |
1055 | 1060 |
UserID = d.UserID, |
1056 | 1061 |
UserName = d.UserName, |
1057 |
IsConsolidate = isConsolidate |
|
1058 |
|
|
1059 | 1062 |
}); |
1060 | 1063 |
}); |
1061 | 1064 |
} |
... | ... | |
1139 | 1142 |
} |
1140 | 1143 |
|
1141 | 1144 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
1145 |
if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); } |
|
1142 | 1146 |
|
1143 |
bool IsConsolidation = false; |
|
1144 |
string UserId = null; |
|
1145 |
|
|
1146 |
if (commentUser.SelectedValue != null) |
|
1147 |
{ |
|
1148 |
if (((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName != "Consolidated") |
|
1149 |
{ |
|
1150 |
UserId = ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName; |
|
1151 |
} |
|
1152 |
else |
|
1153 |
{ |
|
1154 |
IsConsolidation = true; |
|
1155 |
} |
|
1156 |
} |
|
1147 |
if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName).ToList(); } |
|
1157 | 1148 |
|
1158 |
var filterItems = TempMarkupInfoSmallList.WhereIf(commentType.SelectedValue != null, d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)) |
|
1159 |
.WhereIf(UserId != null, d => d.UserName == ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).ToString()) |
|
1160 |
.WhereIf(commentPage.SelectedValue != null, d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)); |
|
1149 |
if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); } |
|
1161 | 1150 |
|
1162 | 1151 |
MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
1163 | 1152 |
|
... | ... | |
1165 | 1154 |
commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList(); |
1166 | 1155 |
} |
1167 | 1156 |
|
1168 |
private void commentFilter_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
1157 |
private void commentType_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
1169 | 1158 |
{ |
1170 | 1159 |
MarkupList.ItemsSource = null; |
1171 | 1160 |
txtSearch.Text = string.Empty; |
1172 |
|
|
1173 | 1161 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
1162 |
if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); } |
|
1174 | 1163 |
|
1175 |
bool IsConsolidation = false; |
|
1176 |
string UserId = null; |
|
1164 |
if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); } |
|
1177 | 1165 |
|
1178 |
if (commentUser.SelectedValue != null) |
|
1179 |
{ |
|
1180 |
if(((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName != "Consolidated") |
|
1181 |
{ |
|
1182 |
UserId = ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName; |
|
1183 |
} |
|
1184 |
else |
|
1185 |
{ |
|
1186 |
IsConsolidation = true; |
|
1187 |
} |
|
1188 |
} |
|
1166 |
if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); } |
|
1167 |
|
|
1168 |
MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
|
1169 |
} |
|
1170 |
|
|
1171 |
private void commentPage_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|
1172 |
{ |
|
1173 |
MarkupList.ItemsSource = null; |
|
1174 |
txtSearch.Text = string.Empty; |
|
1175 |
|
|
1176 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
|
1177 |
if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); } |
|
1178 |
|
|
1179 |
if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); } |
|
1189 | 1180 |
|
1190 |
var filterItems = TempMarkupInfoSmallList.WhereIf(commentType.SelectedValue != null, d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)) |
|
1191 |
.WhereIf(UserId != null, d => d.UserName == UserId) |
|
1192 |
.WhereIf(IsConsolidation,d=>d.IsConsolidate == IsConsolidation) |
|
1193 |
.WhereIf(commentPage.SelectedValue != null, d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)); |
|
1181 |
if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); } |
|
1194 | 1182 |
|
1195 |
MarkupList.ItemsSource = filterItems.OrderBy(d => d.PageNumber).ToList();
|
|
1183 |
MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
|
|
1196 | 1184 |
} |
1197 | 1185 |
|
1198 | 1186 |
private void btnPanorama_Click(object sender, RoutedEventArgs e) |
내보내기 Unified diff