개정판 35a96e24
issue #000: BaseClient_GetMarkupInfoItemsCompleted에서 컨트롤을 생성하도록 수정
Change-Id: I378eb435ba6f0c5c45e3af40cb4ebfb6b79c2afa
KCOM/Services/BaseServices.cs | ||
---|---|---|
183 | 183 |
} |
184 | 184 |
public MarkupInfoItem PreviewUserMarkupInfoItem { get; set; } |
185 | 185 |
|
186 |
/// <summary> |
|
187 |
/// get markupinfo and markupitem from database |
|
188 |
/// </summary> |
|
189 |
/// <param name="sender"></param> |
|
190 |
/// <param name="e"></param> |
|
186 | 191 |
private void BaseClient_GetMarkupInfoItemsCompleted(object sender, GetMarkupInfoItemsCompletedEventArgs e) |
187 | 192 |
{ |
188 | 193 |
Logger.sendResLog("GetMarkupInfoItemsCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1); |
... | ... | |
204 | 209 |
d.userDelete = true; |
205 | 210 |
d.DisplayColor = "#FFFF0000"; |
206 | 211 |
|
207 |
ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx
|
|
212 |
MarkupItemEx markup = new MarkupItemEx
|
|
208 | 213 |
{ |
209 | 214 |
Data = p.Data, |
210 | 215 |
Data_Type = p.Data_Type, |
... | ... | |
214 | 219 |
PageNumber = p.PageNumber, |
215 | 220 |
Symbol_ID = p.Symbol_ID, |
216 | 221 |
Group_ID = p.Group_ID |
217 |
}); |
|
222 |
}; |
|
223 |
ViewerDataModel.Instance.MarkupList_USER.Add(markup); |
|
224 |
|
|
225 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, d.DisplayColor, "", |
|
226 |
d.MarkupInfoID, markup.ID); |
|
227 |
control.Visibility = Visibility.Hidden; |
|
218 | 228 |
} |
219 | 229 |
else |
220 | 230 |
{ |
221 |
ViewerDataModel.Instance.MarkupList_Pre.Add(new MarkupItemEx
|
|
231 |
MarkupItemEx markup = new MarkupItemEx
|
|
222 | 232 |
{ |
223 | 233 |
Data = p.Data, |
224 | 234 |
Data_Type = p.Data_Type, |
... | ... | |
228 | 238 |
PageNumber = p.PageNumber, |
229 | 239 |
Symbol_ID = p.Symbol_ID, |
230 | 240 |
Group_ID = p.Group_ID |
231 |
}); |
|
241 |
}; |
|
242 |
ViewerDataModel.Instance.MarkupList_Pre.Add(markup); |
|
243 |
|
|
244 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, d.DisplayColor, "", |
|
245 |
d.MarkupInfoID, markup.ID); |
|
246 |
control.Visibility = Visibility.Hidden; |
|
232 | 247 |
} |
233 |
//if (p.ID ==App.ViewInfo.UserID) |
|
234 |
//{ |
|
235 |
// d.userDelete = true; |
|
236 |
// d.DisplayColor = "#FFFF0000"; |
|
237 |
//} |
|
238 | 248 |
})); |
239 | 249 |
|
240 | 250 |
var currentUser = e.Result.Where(data => data.UserID == userData.ID).FirstOrDefault(); |
241 |
//var currentUser = e.Result.Where(data => data.UserID == "H2014410").FirstOrDefault(); |
|
242 | 251 |
if (currentUser == null) |
243 | 252 |
{ |
244 | 253 |
var infoId = Commons.shortGuid(); |
... | ... | |
262 | 271 |
}; |
263 | 272 |
|
264 | 273 |
App.Custom_ViewInfoId = infoId; |
265 |
//pureItem.Insert(0,PreviewUserMarkupInfoItem); |
|
266 | 274 |
} |
267 | 275 |
else |
268 | 276 |
{ |
269 | 277 |
App.Custom_ViewInfoId = currentUser.MarkupInfoID; |
270 | 278 |
} |
271 | 279 |
|
272 |
//pureItem.ForEach(d => d.MarkupList = null); |
|
273 |
//ViewerDataModel.Instance._markupInfoList = new ObservableCollection<MarkupInfoItem>(pureItem); |
|
274 | 280 |
ViewerDataModel.Instance._markupInfoList = SetDisplayColor(pureItem, _ViewInfo.UserID); |
275 |
//ViewerDataModel.Instance._markupInfoList = SetDisplayColor(e.Result, _ViewInfo.UserID); |
|
276 | 281 |
|
277 |
|
|
278 |
|
|
279 |
//if (e.Result.Where(data => data.UserID == userData.ID).FirstOrDefault() == null) |
|
280 |
//{ |
|
281 |
|
|
282 |
// PreviewUserMarkupInfoItem = new MarkupInfoItem |
|
283 |
// { |
|
284 |
// CreateTime = DateTime.Now, |
|
285 |
// Depatment = userData.DEPARTMENT, |
|
286 |
// DisplayColor = "#FFFF0000", |
|
287 |
// UserID = userData.ID, |
|
288 |
// UserName = userData.NAME + "(임시저장)", |
|
289 |
// PageCount = 1, |
|
290 |
// Description = "", |
|
291 |
// MarkupInfoID = Commons.shortGuid(), |
|
292 |
// MarkupList = null, |
|
293 |
// MarkupVersionID = Commons.shortGuid(), |
|
294 |
// Consolidate = 0, |
|
295 |
// PartConsolidate = 0, |
|
296 |
// userDelete = true, |
|
297 |
// AvoidConsolidate = 0, |
|
298 |
// IsPreviewUser = true |
|
299 |
// }; |
|
300 |
// ViewerDataModel.Instance._markupInfoList.Add(PreviewUserMarkupInfoItem); |
|
301 |
//} |
|
302 |
|
|
303 |
|
|
304 |
|
|
305 |
var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList(); //Consolidation 된 데이터가 최상단에 올 수 있도록 변경 |
|
282 |
//Consolidation 된 데이터가 최상단에 올 수 있도록 변경 |
|
283 |
var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList(); |
|
306 | 284 |
|
307 | 285 |
markupItem.ForEach(data => |
308 | 286 |
{ |
309 |
if (data.Depatment == null) |
|
310 |
{ |
|
311 |
data.Depatment = "Unknown"; |
|
312 |
//BaseClient.NoticeAccountErrorAsync(_ViewInfo.ProjectNO, data.UserID); |
|
313 |
} |
|
287 |
if (data.Depatment == null) data.Depatment = "Unknown"; |
|
314 | 288 |
}); |
315 | 289 |
gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList; |
316 | 290 |
SetCommentPages(); |
... | ... | |
388 | 362 |
MarkupInfoItem instanceItem = e.AddedItems.FirstOrDefault() as MarkupInfoItem; |
389 | 363 |
var result = instanceItem.Consolidate; |
390 | 364 |
|
391 |
//dataSet.Where(data => data.UserID == "H2011357").ToList().ForEach(data => lstbox.SelectedItems.Remove(data)); |
|
392 | 365 |
if (ea.DialogResult.Value) |
393 | 366 |
{ |
394 | 367 |
ConsolidationMethod(); |
내보내기 Unified diff