프로젝트

일반

사용자정보

개정판 0cda2a88

ID0cda2a885008c0503d20d124631932685c72d462
상위 b4b23404
하위 65d2042f, 2c629eec, 4cb62752, 71208c63, 606884bf, 64374bd8, 7f8a2ff4, 20ef6ffe, b2c6901f, 2c3eae15, 77190232, 6b24246c

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

markus 성능개선
- 일정 페이지범위를 local 저장소에 저장
- Markup데이터를 페이지 로딩전 미리 로드

Change-Id: Ib6ef3d770a360c40acf01d6de04668bee653eee4

차이점 보기:

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
                    this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null);   /// save controls
171
                    ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);   /// save controls
172

  
172 173
                    _CurrentPageNo = this.CurrentPage.PageNumber;
173 174
                }
174 175

  
......
686 687
            }
687 688
        }
688 689

  
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

  
705 690
        public class MarkupInfoItemSmall
706 691
        {
707 692
            public string Id { get; set; }
......
710 695
            public int PageNumber { get; set; }
711 696
            public string Data { get; set; }
712 697
            public int Data_Type { get; set; }
698
            public bool IsConsolidate { get; set; }
713 699
        }
714 700

  
715 701
        private List<MarkupInfoItemSmall> _MarkupInfoSmallList { get; set; }
......
1051 1037
                    {
1052 1038
                        d.MarkupList.ForEach(b =>
1053 1039
                        {
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

  
1054 1049
                            MarkupInfoSmallList.Add(new MarkupInfoItemSmall
1055 1050
                            {
1056 1051
                                Id = b.ID,
......
1059 1054
                                PageNumber = b.PageNumber,
1060 1055
                                UserID = d.UserID,
1061 1056
                                UserName = d.UserName,
1057
                                IsConsolidate = isConsolidate
1058

  
1062 1059
                            });
1063 1060
                        });
1064 1061
                    }
......
1142 1139
            }
1143 1140

  
1144 1141
            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(); }
1146 1142

  
1147
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((KCOM.Common.UsersCommentPagesMember)commentUser.SelectedValue).UserName).ToList();                 }            
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
            }
1148 1157

  
1149
            if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); }
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));
1150 1161

  
1151 1162
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();            
1152 1163
           
......
1154 1165
            commentPage.ItemsSource = MarkupInfoSmallList.Select(d => d.PageNumber).Distinct().OrderBy(d => d).ToList();            
1155 1166
        }
1156 1167

  
1157
        private void commentType_SelectionChanged(object sender, SelectionChangedEventArgs e)
1158
        {
1159
            MarkupList.ItemsSource = null;
1160
            txtSearch.Text = string.Empty;
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(); }
1163

  
1164
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); }
1165

  
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)
1168
        private void commentFilter_SelectionChanged(object sender, SelectionChangedEventArgs e)
1172 1169
        {
1173 1170
            MarkupList.ItemsSource = null;
1174 1171
            txtSearch.Text = string.Empty;
1175 1172

  
1176 1173
            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 1174

  
1179
            if (commentUser.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.UserName == ((IKCOM.MarkupInfoItem)commentUser.SelectedValue).UserName).ToList(); }
1175
            bool IsConsolidation = false;
1176
            string UserId = null;
1177

  
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
            }
1180 1189

  
1181
            if (commentPage.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.PageNumber == Convert.ToInt32(commentPage.SelectedValue)).ToList(); }
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));
1182 1194

  
1183
            MarkupList.ItemsSource = TempMarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList();
1195
            MarkupList.ItemsSource = filterItems.OrderBy(d => d.PageNumber).ToList();
1184 1196
        }
1185 1197

  
1186 1198
        private void btnPanorama_Click(object sender, RoutedEventArgs e)

내보내기 Unified diff

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