개정판 f258d884
Fix: Consolidate 또는 AvoidConsolidate인 레이어만 삭제한다.
Change-Id: Iec8e0061785bbfaeee0fc4f861727f62ee04eacd
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
381 | 381 |
return false; |
382 | 382 |
} |
383 | 383 |
|
384 |
/// <summary> |
|
385 |
/// 주어진 레이어를 삭제한다. |
|
386 |
/// </summary> |
|
387 |
/// <param name="item"></param> |
|
384 | 388 |
public void DeleteItem(MarkupInfoItem item) |
385 | 389 |
{ |
386 | 390 |
if (PreviewUserMarkupInfoItem != null && item.Consolidate == 1 && item.AvoidConsolidate == 0) |
... | ... | |
388 | 392 |
App.Custom_ViewInfoId = PreviewUserMarkupInfoItem.MarkupInfoID; |
389 | 393 |
} |
390 | 394 |
|
391 |
ViewerDataModel.Instance._markupInfoList.Remove(item); |
|
395 |
#region Consolidate 또는 AvoidConsolidate한 레이어만 삭제한다. |
|
396 |
if (item.Consolidate == 1 || item.AvoidConsolidate == 1) ViewerDataModel.Instance._markupInfoList.Remove(item); |
|
397 |
#endregion |
|
392 | 398 |
|
399 |
#region item에 속한 컨트롤들을 삭제한다. |
|
393 | 400 |
ViewerDataModel.Instance.MarkupControls.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a => |
394 | 401 |
{ |
395 | 402 |
ViewerDataModel.Instance.MarkupControls.Remove(a); |
... | ... | |
401 | 408 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate( |
402 | 409 |
null, EventType.Delete, a.CommentID, null); |
403 | 410 |
}); |
411 |
#endregion |
|
404 | 412 |
|
405 | 413 |
ViewerDataModel.Instance.MyMarkupList.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a => |
406 | 414 |
{ |
... | ... | |
411 | 419 |
|
412 | 420 |
gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList; |
413 | 421 |
|
414 |
if (PreviewUserMarkupInfoItem == null && gridViewMarkup.SelectedItems.Where(d => (d as MarkupInfoItem).UserID == App.ViewInfo.UserID).FirstOrDefault() == null)
|
|
422 |
if (PreviewUserMarkupInfoItem == null && gridViewMarkup.SelectedItems.FirstOrDefault(d => (d as MarkupInfoItem).UserID == App.ViewInfo.UserID) == null)
|
|
415 | 423 |
{ |
416 |
if (gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList().Where(d => d.UserID == App.ViewInfo.UserID).Count() == 0)
|
|
424 |
if (!gridViewMarkup.Items.Cast<MarkupInfoItem>().Any(d => d.UserID == App.ViewInfo.UserID))
|
|
417 | 425 |
{ |
418 | 426 |
var infoId = Commons.shortGuid(); |
419 | 427 |
PreviewUserMarkupInfoItem = new MarkupInfoItem |
... | ... | |
438 | 446 |
App.Custom_ViewInfoId = infoId; |
439 | 447 |
} |
440 | 448 |
} |
441 |
//Logger.sendReqLog("DeleteMarkupAsync", App.ViewInfo.ProjectNO + "," + item.MarkupInfoID, 1); |
|
449 |
|
|
442 | 450 |
BaseClient.DeleteMarkupAsync(App.ViewInfo.ProjectNO, item.MarkupInfoID); |
443 | 451 |
} |
444 | 452 |
|
... | ... | |
520 | 528 |
//timer = new Timer(timercallback, null, 0, InitInterval * 60000); |
521 | 529 |
} |
522 | 530 |
|
531 |
/// <summary> |
|
532 |
/// 검색을 위해 원본 PDF 파일을 다운로드한다. |
|
533 |
/// </summary> |
|
523 | 534 |
private void DownloadOriginalFile() |
524 | 535 |
{ |
525 | 536 |
#region 임시파일 다운로드 |
... | ... | |
593 | 604 |
} |
594 | 605 |
} |
595 | 606 |
|
596 |
//private void timercallback(Object o) |
|
597 |
//{ |
|
598 |
// Stopwatch sw = new Stopwatch(); |
|
599 |
// sw.Start(); |
|
600 |
// TempFile.TempFileAdd(); |
|
601 |
// sw.Stop(); |
|
602 |
|
|
603 |
// Dispatcher.InvokeAsync(new Action(delegate |
|
604 |
// { |
|
605 |
// if (this.ParentOfType<MainWindow>().dzTopMenu.cbAutoSave.IsChecked == true) //Auto Save Checked? |
|
606 |
// { |
|
607 |
// timer.Change(((int)this.ParentOfType<MainWindow>().dzTopMenu.cbSaveInterval.Value * 60000) / 2, sw.ElapsedMilliseconds); //Timer Setting |
|
608 |
// } |
|
609 |
// })); |
|
610 |
|
|
611 |
// ////GC.Collect(); |
|
612 |
//} |
|
613 |
|
|
614 | 607 |
/// <summary> |
615 | 608 |
/// update my markuplist |
616 | 609 |
/// - update existing markup data if already exist |
내보내기 Unified diff