개정판 6b5d33c6
issue #1002 comment 선택 시 control 객체의 focus event 로 인한 문제로 event 호출 위치및 순서를 정리.
Change-Id: Ie8752339ac93bab04e24f94dbc9a61d0db8f93bd
KCOM/Services/BaseServices.cs | ||
---|---|---|
478 | 478 |
} |
479 | 479 |
else //파라미터로 넘어온 사용자가 걸리지 않은 경우 |
480 | 480 |
{ |
481 |
MarkupUserListDisplay(); |
|
481 |
EmptyControlCheck(); |
|
482 |
List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업 |
|
483 |
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업 |
|
484 |
List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업 |
|
485 |
MarkupToPDF.Controls.Parsing.LayerControl layerControl = new MarkupToPDF.Controls.Parsing.LayerControl(); |
|
486 |
layerControl.ProjectNo = App.ViewInfo.ProjectNO; |
|
487 |
#region 코멘트 보기 |
|
488 |
if (e.AddedItems.Count() > 0) |
|
489 |
{ |
|
490 |
foreach (var item in gridSelectionItem) |
|
491 |
{ |
|
492 |
if ((item.UserID == App.ViewInfo.UserID) && (this.pageNavigator.CurrentPage != null)) |
|
493 |
{ |
|
494 |
|
|
495 |
var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList(); |
|
496 |
var my_item = Common.ViewerDataModel.Instance.MarkupControls_USER.FirstOrDefault(); |
|
497 |
Common.ViewerDataModel.Instance.current_page_commentcnt = Common.ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().Count; |
|
498 |
if (my_item == null) |
|
499 |
{ |
|
500 |
foreach (var markup in instance) |
|
501 |
{ |
|
502 |
layerControl.markupParseEx(markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markup.ID); |
|
503 |
} |
|
504 |
} |
|
505 |
else |
|
506 |
{ |
|
507 |
var test = instance.Where(data => data.MarkupInfoID == my_item.MarkupInfoID).FirstOrDefault(); |
|
508 |
|
|
509 |
if (test == null) |
|
510 |
{ |
|
511 |
foreach (var markup in instance) |
|
512 |
{ |
|
513 |
layerControl.markupParseEx(markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markup.ID); |
|
514 |
} |
|
515 |
} |
|
516 |
} |
|
517 |
} |
|
518 |
else if (this.pageNavigator.CurrentPage != null) |
|
519 |
{ |
|
520 |
var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList(); |
|
521 |
foreach (var markup in instance) |
|
522 |
{ |
|
523 |
layerControl.markupParse(markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID); |
|
524 |
} |
|
525 |
} |
|
526 |
} |
|
527 |
//} |
|
528 |
} |
|
529 |
#endregion |
|
530 |
#region 코멘트 숨기기 |
|
531 |
else if (e.RemovedItems.Count > 0) |
|
532 |
{ |
|
533 |
var _infoItem = e.RemovedItems.Cast<MarkupInfoItem>().ToList(); |
|
534 |
|
|
535 |
(from A in _infoItem |
|
536 |
from B in Common.ViewerDataModel.Instance.MarkupControls |
|
537 |
where A.MarkupInfoID == B.MarkupInfoID |
|
538 |
select B).ToList().ForEach(data => |
|
539 |
{ |
|
540 |
Common.ViewerDataModel.Instance.MarkupControls.Remove(data); |
|
541 |
}); |
|
542 |
|
|
543 |
//var myComment = _infoItem.Where(d => d.MarkupInfoID == App.Custom_ViewInfoId).FirstOrDefault(); |
|
544 |
var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault(); |
|
545 |
if (myComment != null) |
|
546 |
{ |
|
547 |
ChangeCommentReact(); |
|
548 |
Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem) |
|
549 |
{ |
|
550 |
if (markupitem.IsNew) |
|
551 |
{ |
|
552 |
var root = layerControl.MarkupToString(markupitem, App.ViewInfo.UserID); |
|
553 |
ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx |
|
554 |
{ |
|
555 |
ID = markupitem.CommentID, |
|
556 |
Data = root.ConvertData, |
|
557 |
Data_Type = root.DATA_TYPE, |
|
558 |
MarkupInfoID = markupitem.MarkupInfoID, |
|
559 |
PageNumber = this.pageNavigator.CurrentPage.PageNumber, |
|
560 |
}); |
|
561 |
} |
|
562 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(markupitem); |
|
563 |
}); |
|
564 |
} |
|
565 |
} |
|
566 |
#endregion |
|
482 | 567 |
} |
483 | 568 |
} |
484 | 569 |
|
내보내기 Unified diff