개정판 d62c0439
issue #923: remove undo after selecting item, fixed multi selection logic
Change-Id: Id2a6e63336747aeaf3337218f5e2e3b35fba5dfa
KCOM/Common/SelectionSet.cs | ||
---|---|---|
25 | 25 |
using System.Xml; |
26 | 26 |
using System.Xml.Serialization; |
27 | 27 |
|
28 |
namespace KCOM |
|
28 |
namespace KCOM.Common
|
|
29 | 29 |
{ |
30 | 30 |
public class SelectionSet |
31 | 31 |
{ |
... | ... | |
49 | 49 |
} |
50 | 50 |
} |
51 | 51 |
|
52 |
public List<CommentUserInfo> SelectedItems |
|
53 |
{ |
|
54 |
get |
|
55 |
{ |
|
56 |
List<CommentUserInfo> res = new List<CommentUserInfo>(); |
|
57 |
foreach (var item in Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children) |
|
58 |
{ |
|
59 |
if (item.GetType().Name == "AdornerFinal") |
|
60 |
{ |
|
61 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
|
62 |
{ |
|
63 |
res.Add(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
64 |
} |
|
65 |
} |
|
66 |
} |
|
67 |
|
|
68 |
return res; |
|
69 |
} |
|
70 |
} |
|
71 |
|
|
52 | 72 |
/// <summary> |
53 | 73 |
/// select item which's bouding rectangle is inside of given rect |
54 | 74 |
/// </summary> |
KCOM/Common/TempFile.cs | ||
---|---|---|
408 | 408 |
if (control != null) |
409 | 409 |
{ |
410 | 410 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
411 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
412 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
411 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
412 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
413 | 413 |
} |
414 | 414 |
|
415 | 415 |
//Control |
... | ... | |
434 | 434 |
if (control != null) |
435 | 435 |
{ |
436 | 436 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
437 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
438 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
437 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
438 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
439 | 439 |
} |
440 | 440 |
|
441 | 441 |
//Control |
... | ... | |
461 | 461 |
if (control != null) |
462 | 462 |
{ |
463 | 463 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
464 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
465 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
464 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
465 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
466 | 466 |
} |
467 | 467 |
break; |
468 | 468 |
} |
... | ... | |
482 | 482 |
updatetime = ViewerDataModel.Instance._markupInfoList.OrderByDescending(order => order.UpdateTime).FirstOrDefault().UpdateTime; |
483 | 483 |
} |
484 | 484 |
|
485 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.EmptyControlCheck(); |
|
486 |
|
|
487 | 485 |
if (undoTime > updatetime) |
488 | 486 |
{ |
489 | 487 |
if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0) |
... | ... | |
492 | 490 |
{ |
493 | 491 |
var root = MarkupParser.MarkupToString(control, App.ViewInfo.UserID); |
494 | 492 |
|
495 |
var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault();
|
|
493 |
var existItem = ViewerDataModel.Instance.MyMarkupList.Where(data => data.ID == root.CommentID).FirstOrDefault();
|
|
496 | 494 |
if (existItem != null) |
497 | 495 |
{ |
498 | 496 |
if (existItem.Data != root.ConvertData) |
... | ... | |
512 | 510 |
{ |
513 | 511 |
if (root.CommentID != null) |
514 | 512 |
{ |
515 |
var currentCommentCheck = ViewerDataModel.Instance.MarkupList_USER.Where(dt => dt.ID == control.CommentID).FirstOrDefault();
|
|
513 |
var currentCommentCheck = ViewerDataModel.Instance.MyMarkupList.Where(dt => dt.ID == control.CommentID).FirstOrDefault();
|
|
516 | 514 |
if (currentCommentCheck != null) |
517 | 515 |
{ |
518 | 516 |
tempDtList.Add(new TempDt() |
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
121 | 121 |
} |
122 | 122 |
|
123 | 123 |
private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; } |
124 |
public List<IKCOM.MarkupItemEx> MarkupList_USER
|
|
124 |
public List<IKCOM.MarkupItemEx> MyMarkupList
|
|
125 | 125 |
{ |
126 | 126 |
get |
127 | 127 |
{ |
KCOM/Controls/CheckList.xaml.cs | ||
---|---|---|
890 | 890 |
SelectionSet.Instance.UnSelect(menu); |
891 | 891 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
892 | 892 |
{ |
893 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.RefactoryCommentReact(menu);
|
|
893 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
|
|
894 | 894 |
} |
895 | 895 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID) |
896 | 896 |
{ |
... | ... | |
898 | 898 |
} |
899 | 899 |
else |
900 | 900 |
{ |
901 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.RefactoryCommentReact(menu);
|
|
901 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
|
|
902 | 902 |
} |
903 | 903 |
} |
904 | 904 |
|
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
705 | 705 |
//gogogo.ItemsSource = ViewerDataModel.Instance._markupInfoList.Where(d=>d.UserName == sender as RadCombo |
706 | 706 |
|
707 | 707 |
var temp = e.AddedItems.Cast<MarkupInfoItem>().FirstOrDefault(); |
708 |
var markuplist = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.MarkupInfoID == temp.MarkupInfoID).ToList();
|
|
708 |
var markuplist = ViewerDataModel.Instance.MyMarkupList.Where(d => d.MarkupInfoID == temp.MarkupInfoID).ToList();
|
|
709 | 709 |
markuplist.ForEach(d => |
710 | 710 |
{ |
711 | 711 |
MarkupInfoSmallList.Add(new MarkupInfoItemSmall |
... | ... | |
727 | 727 |
MarkupInfoSmallList.Clear(); |
728 | 728 |
ViewerDataModel.Instance._markupInfoList.ToList().ForEach(d => |
729 | 729 |
{ |
730 |
var markuplist = ViewerDataModel.Instance.MarkupList_USER.Where(u => u.MarkupInfoID == d.MarkupInfoID).ToList();
|
|
730 |
var markuplist = ViewerDataModel.Instance.MyMarkupList.Where(u => u.MarkupInfoID == d.MarkupInfoID).ToList();
|
|
731 | 731 |
|
732 | 732 |
markuplist.ForEach(b => |
733 | 733 |
{ |
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
871 | 871 |
SelectionSet.Instance.UnSelect(menu); |
872 | 872 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
873 | 873 |
{ |
874 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.RefactoryCommentReact(menu);
|
|
874 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
|
|
875 | 875 |
} |
876 | 876 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID) |
877 | 877 |
{ |
... | ... | |
879 | 879 |
} |
880 | 880 |
else |
881 | 881 |
{ |
882 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.RefactoryCommentReact(menu);
|
|
882 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
|
|
883 | 883 |
} |
884 | 884 |
} |
885 | 885 |
Application.Current.MainWindow.Focus(); |
KCOM/Controls/cadPanel.xaml.cs | ||
---|---|---|
99 | 99 |
File.AppendAllText(FileName, data); |
100 | 100 |
*/ |
101 | 101 |
|
102 |
/*string Data = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber
|
|
102 |
/*string Data = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber
|
|
103 | 103 |
&& d.Data_Type == Convert.ToInt32(MarkupToPDF.Controls.Common.ControlType.Coordinate)).FirstOrDefault().Data; |
104 | 104 |
*/ |
105 | 105 |
|
KCOM/Events/ConsolidateCommand.cs | ||
---|---|---|
44 | 44 |
try |
45 | 45 |
{ |
46 | 46 |
string sDocID = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocInfo.ID; |
47 |
/// 현재 작업 내용을 저장 |
|
47 | 48 |
Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.SaveEvent(null, null); |
48 | 49 |
|
49 | 50 |
Logger.sendReqLog("Consolidate", App.ViewInfo.ProjectNO + "," + App.ViewInfo.UserID + "," + sDocID + "," + InfoList, 1); |
KCOM/Events/DeleteCommand.cs | ||
---|---|---|
75 | 75 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(comment); |
76 | 76 |
ViewerDataModel.Instance.MarkupControls.Remove(comment); |
77 | 77 |
|
78 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == comment.CommentID).FirstOrDefault();
|
|
79 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
78 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == comment.CommentID).FirstOrDefault();
|
|
79 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
29 | 29 |
|
30 | 30 |
MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn(); |
31 | 31 |
|
32 |
public List<CommentUserInfo> SelectedItems |
|
33 |
{ |
|
34 |
get |
|
35 |
{ |
|
36 |
List<CommentUserInfo> res = new List<CommentUserInfo>(); |
|
37 |
foreach (var item in this.dzMainMenu.SelectLayer.Children) |
|
38 |
{ |
|
39 |
if (item.GetType().Name == "AdornerFinal") |
|
40 |
{ |
|
41 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
|
42 |
{ |
|
43 |
res.Add(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
44 |
} |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
48 |
return res; |
|
49 |
} |
|
50 |
} |
|
51 |
|
|
52 | 32 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
53 | 33 |
{ |
54 | 34 |
switch (e.Key) |
... | ... | |
199 | 179 |
{ |
200 | 180 |
markupReturn = MarkupParser.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID); |
201 | 181 |
|
202 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
182 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
203 | 183 |
|
204 | 184 |
if (Item_ != null) |
205 | 185 |
{ |
206 |
id = "|SymbolID|" + ViewerDataModel.Instance.MarkupList_USER.Where
|
|
186 |
id = "|SymbolID|" + ViewerDataModel.Instance.MyMarkupList.Where
|
|
207 | 187 |
(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault().Symbol_ID; |
208 | 188 |
} |
209 | 189 |
else |
... | ... | |
579 | 559 |
#region 삭제하기(Delete) |
580 | 560 |
case Key.Delete: |
581 | 561 |
{ |
582 |
DeleteCommand.Instance.Execute(this.SelectedItems);
|
|
562 |
DeleteCommand.Instance.Execute(SelectionSet.Instance.SelectedItems);
|
|
583 | 563 |
/* |
584 | 564 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
585 | 565 |
{ |
... | ... | |
607 | 587 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
608 | 588 |
ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
609 | 589 |
|
610 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
611 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
590 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
591 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
612 | 592 |
|
613 | 593 |
//임시파일에서도 삭제한다. |
614 | 594 |
TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
307 | 307 |
/// <param name="e"></param> |
308 | 308 |
public void SaveEvent(object sender, RoutedEventArgs e) |
309 | 309 |
{ |
310 |
this.ParentOfType<MainWindow>().dzMainMenu.EmptyControlCheck(); |
|
311 |
|
|
312 | 310 |
if (this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy == true) return; |
313 | 311 |
|
314 | 312 |
this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = true; |
... | ... | |
322 | 320 |
} |
323 | 321 |
|
324 | 322 |
/// <summary> |
325 |
/// save document
|
|
323 |
/// save markup
|
|
326 | 324 |
/// </summary> |
327 | 325 |
/// <param name="sender"></param> |
328 | 326 |
/// <param name="e"></param> |
329 | 327 |
public void _SaveEvent(object sender, RoutedEventArgs e) |
330 | 328 |
{ |
329 |
var menu = this.ParentOfType<MainWindow>().dzMainMenu; |
|
331 | 330 |
try |
332 | 331 |
{ |
333 | 332 |
SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu); |
334 | 333 |
|
335 | 334 |
this.ParentOfType<MainWindow>().dzMainMenu.InkControl_Convert(); |
336 | 335 |
|
337 |
var menu = this.ParentOfType<MainWindow>().dzMainMenu; |
|
338 |
|
|
339 |
//코멘트가 없을 경우 |
|
340 |
if (ViewerDataModel.Instance.MarkupList_USER.Count == 0) |
|
341 |
{ |
|
342 |
foreach (var item in menu.gridViewMarkup.SelectedItems) |
|
343 |
{ |
|
344 |
if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID) |
|
345 |
{ |
|
346 |
this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem)); |
|
347 |
return; |
|
348 |
} |
|
349 |
} |
|
350 |
} |
|
351 |
|
|
352 |
menu.ChangeCommentReact(); |
|
353 |
|
|
354 | 336 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
355 | 337 |
{ |
356 |
RefactoryCommentReact(menu);
|
|
338 |
this.ExecuteSaveCommand(menu);
|
|
357 | 339 |
} |
358 | 340 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0) |
359 | 341 |
{ |
... | ... | |
366 | 348 |
{ |
367 | 349 |
if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID) |
368 | 350 |
{ |
369 |
RefactoryCommentReact(menu);
|
|
351 |
this.ExecuteSaveCommand(menu);
|
|
370 | 352 |
ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now; |
371 |
|
|
372 | 353 |
if (ViewerDataModel.Instance.IsConsolidate) |
373 | 354 |
{ |
374 | 355 |
return; |
375 | 356 |
} |
376 | 357 |
|
377 |
menu.gridViewMarkup.ItemsSource = null; |
|
378 |
menu.gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList; |
|
379 |
menu.gridViewMarkup.SelectedItem = item; |
|
380 |
GroupDescriptor descriptor = new GroupDescriptor(); |
|
381 |
descriptor.Member = "Depatment"; |
|
382 |
descriptor.DisplayContent = "DEPT"; |
|
383 |
descriptor.SortDirection = ListSortDirection.Ascending; |
|
384 |
menu.gridViewMarkup.GroupDescriptors.Add(descriptor); |
|
385 |
|
|
386 | 358 |
if (sender != null) |
387 | 359 |
{ |
388 | 360 |
if (ViewerDataModel.Instance.IsPressCtrl) |
... | ... | |
410 | 382 |
} |
411 | 383 |
finally |
412 | 384 |
{ |
385 |
/// delete markup information when 코멘트가 없을 경우 |
|
386 |
if (ViewerDataModel.Instance.MyMarkupList.Count == 0) |
|
387 |
{ |
|
388 |
foreach (var item in menu.gridViewMarkup.SelectedItems) |
|
389 |
{ |
|
390 |
if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID) |
|
391 |
{ |
|
392 |
this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem)); |
|
393 |
} |
|
394 |
} |
|
395 |
} |
|
413 | 396 |
} |
414 | 397 |
} |
415 | 398 |
|
416 |
public void RefactoryCommentReact(MainMenu menu) |
|
399 |
/// <summary> |
|
400 |
/// call save command |
|
401 |
/// </summary> |
|
402 |
/// <param name="menu"></param> |
|
403 |
private void ExecuteSaveCommand(MainMenu menu) |
|
417 | 404 |
{ |
418 |
this.ParentOfType<MainWindow>().dzMainMenu.InkControl_Convert(); |
|
419 |
|
|
420 | 405 |
SaveCommand.Instance.Project_No = App.ViewInfo.ProjectNO; |
421 | 406 |
SaveCommand.Instance.document_id = App.ViewInfo.DocumentItemID; |
422 | 407 |
SaveCommand.Instance.user_id = App.ViewInfo.UserID; |
... | ... | |
424 | 409 |
|
425 | 410 |
try |
426 | 411 |
{ |
427 |
List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>(); |
|
412 |
this.ParentOfType<MainWindow>().dzMainMenu.InkControl_Convert(); |
|
413 |
|
|
414 |
List<IKCOM.MarkupInfoItem> SelectedMarkupInfos = new List<IKCOM.MarkupInfoItem>(); |
|
428 | 415 |
foreach (var item in menu.gridViewMarkup.SelectedItems) |
429 | 416 |
{ |
430 | 417 |
if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID) |
431 | 418 |
{ |
432 |
MySelectItem.Add(item as IKCOM.MarkupInfoItem);
|
|
419 |
SelectedMarkupInfos.Add(item as IKCOM.MarkupInfoItem);
|
|
433 | 420 |
} |
434 | 421 |
} |
435 | 422 |
|
436 |
menu.ChangeCommentReact();
|
|
437 |
SaveCommand.Instance.Execute(MySelectItem, SaveCommand.Instance.page_no);
|
|
423 |
menu.UpdateMyMarkupList();
|
|
424 |
SaveCommand.Instance.Execute(SelectedMarkupInfos, SaveCommand.Instance.page_no);
|
|
438 | 425 |
SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs); |
439 | 426 |
} |
440 | 427 |
catch (Exception ex) |
... | ... | |
457 | 444 |
SelectionSet.Instance.UnSelect(menu); |
458 | 445 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
459 | 446 |
{ |
460 |
RefactoryCommentReact(menu);
|
|
447 |
this.SaveEvent(null, null);
|
|
461 | 448 |
} |
462 | 449 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID) |
463 | 450 |
{ |
... | ... | |
465 | 452 |
} |
466 | 453 |
else |
467 | 454 |
{ |
468 |
RefactoryCommentReact(menu);
|
|
455 |
this.SaveEvent(null, null);
|
|
469 | 456 |
} |
470 | 457 |
} |
471 | 458 |
|
... | ... | |
2097 | 2084 |
#endregion |
2098 | 2085 |
#region Delete |
2099 | 2086 |
case "Delete": |
2100 |
DeleteCommand.Instance.Execute(this.ParentOfType<MainWindow>().SelectedItems);
|
|
2087 |
DeleteCommand.Instance.Execute(SelectionSet.Instance.SelectedItems);
|
|
2101 | 2088 |
this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Clear(); |
2102 | 2089 |
|
2103 | 2090 |
instanceToggle.IsChecked = false; |
... | ... | |
2178 | 2165 |
//MARKUP_DATA UPDATE |
2179 | 2166 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.UpdateMarkupData((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, group_id, App.ViewInfo.ProjectNO); |
2180 | 2167 |
//Logger.sendReqLog("UpdateMarkupData: ", "", 1); |
2181 |
ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().Group_ID = group_id;
|
|
2182 |
ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().IsUpdate = true;
|
|
2168 |
ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().Group_ID = group_id;
|
|
2169 |
ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().IsUpdate = true;
|
|
2183 | 2170 |
} |
2184 | 2171 |
} |
2185 | 2172 |
} |
... | ... | |
2218 | 2205 |
{ |
2219 | 2206 |
if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData)) |
2220 | 2207 |
{ |
2221 |
long group_id = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault().Group_ID;
|
|
2208 |
long group_id = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault().Group_ID;
|
|
2222 | 2209 |
//MARKUP_DATA UPDATE |
2223 | 2210 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.UpdateMarkupData((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, 0, App.ViewInfo.ProjectNO); |
2224 | 2211 |
//Logger.sendReqLog("UpdateMarkupData: ", "", 1); |
2225 |
ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().Group_ID = 0;
|
|
2226 |
ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().IsUpdate = true;
|
|
2212 |
ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().Group_ID = 0;
|
|
2213 |
ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as CommentUserInfo).CommentID).FirstOrDefault().IsUpdate = true;
|
|
2227 | 2214 |
|
2228 | 2215 |
|
2229 | 2216 |
//MARKUP_DATA_GROUP UPDATE |
... | ... | |
2439 | 2426 |
{ |
2440 | 2427 |
if ((item.UserID == App.ViewInfo.UserID) && (ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage != null)) |
2441 | 2428 |
{ |
2442 |
var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber &&
|
|
2429 |
var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber &&
|
|
2443 | 2430 |
d.MarkupInfoID == item.MarkupInfoID).ToList(); |
2444 | 2431 |
data = new string[instance.Count]; |
2445 | 2432 |
foreach (var markup in instance) |
KCOM/KCOM.csproj.user | ||
---|---|---|
2 | 2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | 3 |
<PropertyGroup> |
4 | 4 |
<ReferencePath>C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\KCOM\x64\;C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\KCOM\x86\</ReferencePath> |
5 |
<ProjectView>ShowAllFiles</ProjectView>
|
|
5 |
<ProjectView>ProjectFiles</ProjectView>
|
|
6 | 6 |
</PropertyGroup> |
7 | 7 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> |
8 | 8 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQyIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJhZG1pbiIsIk1vZGUiOjB9</StartArguments> |
... | ... | |
10 | 10 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> |
11 | 11 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQwIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJIMjAxMTM1NyIsIk1vZGUiOjB9</StartArguments> |
12 | 12 |
<StartAction>Project</StartAction> |
13 |
<StartProgram>C:\Program Files\DOFTECH\MARKUS\KCOM.exe</StartProgram> |
|
13 | 14 |
</PropertyGroup> |
14 | 15 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> |
15 | 16 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQwIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJIMjAxMTM1NyIsIk1vZGUiOjB9</StartArguments> |
KCOM/Services/BaseServices.cs | ||
---|---|---|
195 | 195 |
public MarkupInfoItem PreviewUserMarkupInfoItem { get; set; } |
196 | 196 |
|
197 | 197 |
/// <summary> |
198 |
/// 문서 정보를 가져온다 |
|
199 |
/// </summary> |
|
200 |
/// <param name="sender"></param> |
|
201 |
/// <param name="e"></param> |
|
202 |
private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e) |
|
203 |
{ |
|
204 |
Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1); |
|
205 |
|
|
206 |
if (e.Error != null) |
|
207 |
{ |
|
208 |
DialogMessage_Alert("페이지정보를 가져올 수 없습니다.", "Alert"); |
|
209 |
return; |
|
210 |
} |
|
211 |
|
|
212 |
var MainUrl = DeepZoomUrl.Replace("{baseUrl}", App.SystemInfo.HostName); |
|
213 |
MainUrl = MainUrl.Replace("{TileSourcePath}", _ViewInfo.ProjectNO + "_Tile"); |
|
214 |
MainUrl = MainUrl.Replace("{ItemsPath}", (Convert.ToInt64(_ViewInfo.DocumentItemID) / 100).ToString()); |
|
215 |
MainUrl = MainUrl.Replace("{SharepointItemID}", _ViewInfo.DocumentItemID); |
|
216 |
MainUrl = MainUrl.Replace(@"http://http://", @"http://"); |
|
217 |
|
|
218 |
_DocInfo = e.Result; |
|
219 |
foreach (var item in _DocInfo.DOCPAGE.OrderBy(order => order.PAGE_NUMBER)) |
|
220 |
{ |
|
221 |
ViewerDataModel.Instance.Document_Info.Add(item); |
|
222 |
} |
|
223 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID, 1); |
|
224 |
BaseClient.GetMarkupInfoItemsAsync(_ViewInfo.ProjectNO, _DocInfo.ID); |
|
225 |
CurrentDoc = new Common.DocumentSet |
|
226 |
{ |
|
227 |
docInfo = _DocInfo, |
|
228 |
Document_Id = _DocInfo.DOCUMENT_ID, |
|
229 |
Document_NO = _DocItem.DOCUMENT_NO, |
|
230 |
File_Original = _DocInfo.ORIGINAL_FILE, |
|
231 |
File_Result = _DocItem.RESULT_FILE, |
|
232 |
Group_No = _DocItem.GROUP_NO, |
|
233 |
ProjectNo = _DocItem.PROJECT_NO, |
|
234 |
Revision = _DocItem.REVISION, |
|
235 |
}; |
|
236 |
var instanceMain = this.ParentOfType<MainWindow>(); |
|
237 |
instanceMain.dzTopMenu.tlcurrentPage.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
238 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
239 |
string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem.DOCUMENT_NO, _DocItem.REVISION, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()); |
|
240 |
instanceMain.TitleText.Text = apptitle; |
|
241 |
instanceMain.Title = apptitle; |
|
242 |
this.pageNavigator.SetPageNavi(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl); |
|
243 |
|
|
244 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
|
245 |
|
|
246 |
//ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad(); |
|
247 |
|
|
248 |
Logger.sendReqLog("GetVPRevisionHistoryAsync", CurrentDoc.ProjectNo + "," + CurrentDoc.Document_NO + "," + CurrentDoc.Document_Id, 1); |
|
249 |
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id); |
|
250 |
} |
|
251 |
|
|
252 |
/// <summary> |
|
198 | 253 |
/// get markupinfo and markupitem from database |
199 | 254 |
/// </summary> |
200 | 255 |
/// <param name="sender"></param> |
... | ... | |
211 | 266 |
var pureItem = e.Result; |
212 | 267 |
if (pureItem.Count > 0) |
213 | 268 |
{ |
214 |
ViewerDataModel.Instance.MarkupList_USER.Clear();
|
|
269 |
ViewerDataModel.Instance.MyMarkupList.Clear();
|
|
215 | 270 |
} |
216 | 271 |
|
217 | 272 |
foreach(var info in e.Result) |
... | ... | |
246 | 301 |
Symbol_ID = p.Symbol_ID, |
247 | 302 |
Group_ID = p.Group_ID |
248 | 303 |
}; |
249 |
ViewerDataModel.Instance.MarkupList_USER.Add(markup);
|
|
304 |
ViewerDataModel.Instance.MyMarkupList.Add(markup);
|
|
250 | 305 |
|
251 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, d.DisplayColor, "",
|
|
306 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, d.DisplayColor, "",
|
|
252 | 307 |
d.MarkupInfoID, markup.ID); |
253 | 308 |
control.Visibility = Visibility.Hidden; |
254 | 309 |
} |
... | ... | |
267 | 322 |
}; |
268 | 323 |
ViewerDataModel.Instance.MarkupList_Pre.Add(markup); |
269 | 324 |
|
270 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, d.DisplayColor, "",
|
|
325 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, d.DisplayColor, "",
|
|
271 | 326 |
d.MarkupInfoID, markup.ID); |
272 | 327 |
control.Visibility = Visibility.Hidden; |
273 | 328 |
} |
... | ... | |
407 | 462 |
} |
408 | 463 |
else //파라미터로 넘어온 사용자가 걸리지 않은 경우 |
409 | 464 |
{ |
410 |
EmptyControlCheck(); |
|
411 | 465 |
List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업 |
412 | 466 |
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업 |
413 | 467 |
List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업 |
... | ... | |
421 | 475 |
var controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList(); |
422 | 476 |
if (controls.Count == 0) |
423 | 477 |
{ |
424 |
var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
|
478 |
var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
|
425 | 479 |
foreach (var markup in instance) |
426 | 480 |
{ |
427 | 481 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", |
... | ... | |
432 | 486 |
controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList(); |
433 | 487 |
foreach (var control in controls) |
434 | 488 |
{ |
489 |
Logger.sendCheckLog(String.Format("=={0}", control), 1); |
|
435 | 490 |
control.Visibility = Visibility.Visible; |
436 | 491 |
} |
437 | 492 |
} |
... | ... | |
474 | 529 |
var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault(); |
475 | 530 |
if (myComment != null) |
476 | 531 |
{ |
477 |
ChangeCommentReact(); |
|
478 |
|
|
479 | 532 |
Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem) |
480 | 533 |
{ |
481 | 534 |
markupitem.Visibility = Visibility.Hidden; |
482 | 535 |
}); |
483 |
|
|
484 |
|
|
485 | 536 |
} |
486 | 537 |
} |
487 | 538 |
#endregion |
... | ... | |
596 | 647 |
} |
597 | 648 |
} |
598 | 649 |
|
599 |
/// <summary> |
|
600 |
/// 문서 정보를 가져온다 |
|
601 |
/// </summary> |
|
602 |
/// <param name="sender"></param> |
|
603 |
/// <param name="e"></param> |
|
604 |
private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e) |
|
605 |
{ |
|
606 |
Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1); |
|
607 |
|
|
608 |
if (e.Error != null) |
|
609 |
{ |
|
610 |
DialogMessage_Alert("페이지정보를 가져올 수 없습니다.", "Alert"); |
|
611 |
return; |
|
612 |
} |
|
613 |
|
|
614 |
var MainUrl = DeepZoomUrl.Replace("{baseUrl}", App.SystemInfo.HostName); |
|
615 |
MainUrl = MainUrl.Replace("{TileSourcePath}", _ViewInfo.ProjectNO + "_Tile"); |
|
616 |
MainUrl = MainUrl.Replace("{ItemsPath}", (Convert.ToInt64(_ViewInfo.DocumentItemID) / 100).ToString()); |
|
617 |
MainUrl = MainUrl.Replace("{SharepointItemID}", _ViewInfo.DocumentItemID); |
|
618 |
MainUrl = MainUrl.Replace(@"http://http://", @"http://"); |
|
619 |
|
|
620 |
_DocInfo = e.Result; |
|
621 |
foreach (var item in _DocInfo.DOCPAGE.OrderBy(order => order.PAGE_NUMBER)) |
|
622 |
{ |
|
623 |
ViewerDataModel.Instance.Document_Info.Add(item); |
|
624 |
} |
|
625 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID, 1); |
|
626 |
BaseClient.GetMarkupInfoItemsAsync(_ViewInfo.ProjectNO, _DocInfo.ID); |
|
627 |
CurrentDoc = new Common.DocumentSet |
|
628 |
{ |
|
629 |
docInfo = _DocInfo, |
|
630 |
Document_Id = _DocInfo.DOCUMENT_ID, |
|
631 |
Document_NO = _DocItem.DOCUMENT_NO, |
|
632 |
File_Original = _DocInfo.ORIGINAL_FILE, |
|
633 |
File_Result = _DocItem.RESULT_FILE, |
|
634 |
Group_No = _DocItem.GROUP_NO, |
|
635 |
ProjectNo = _DocItem.PROJECT_NO, |
|
636 |
Revision = _DocItem.REVISION, |
|
637 |
}; |
|
638 |
var instanceMain = this.ParentOfType<MainWindow>(); |
|
639 |
instanceMain.dzTopMenu.tlcurrentPage.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
640 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
641 |
string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem.DOCUMENT_NO, _DocItem.REVISION, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()); |
|
642 |
instanceMain.TitleText.Text = apptitle; |
|
643 |
instanceMain.Title = apptitle; |
|
644 |
this.pageNavigator.SetPageNavi(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl); |
|
645 |
|
|
646 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
|
647 |
|
|
648 |
//ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad(); |
|
649 |
|
|
650 |
Logger.sendReqLog("GetVPRevisionHistoryAsync", CurrentDoc.ProjectNo + "," + CurrentDoc.Document_NO + "," + CurrentDoc.Document_Id, 1); |
|
651 |
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id); |
|
652 |
} |
|
650 |
|
|
653 | 651 |
|
654 | 652 |
|
655 | 653 |
public void SetView(ViewInfo info) |
... | ... | |
769 | 767 |
//{ |
770 | 768 |
// if (item.UserID == App.ViewInfo.UserID) |
771 | 769 |
// { |
772 |
// ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
770 |
// ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
773 | 771 |
// { |
774 | 772 |
// layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID); |
775 | 773 |
// }); |
... | ... | |
801 | 799 |
{ |
802 | 800 |
if (item.UserID == App.ViewInfo.UserID) |
803 | 801 |
{ |
804 |
ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
802 |
ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
805 | 803 |
{ |
806 | 804 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", |
807 | 805 |
item.MarkupInfoID, markupitem.ID); |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
316 | 316 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(a); |
317 | 317 |
}); |
318 | 318 |
|
319 |
ViewerDataModel.Instance.MarkupList_USER.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a =>
|
|
319 |
ViewerDataModel.Instance.MyMarkupList.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a =>
|
|
320 | 320 |
{ |
321 | 321 |
ComingNewBieEnd = false; |
322 |
ViewerDataModel.Instance.MarkupList_USER.Remove(a);
|
|
322 |
ViewerDataModel.Instance.MyMarkupList.Remove(a);
|
|
323 | 323 |
//임시파일에서도 삭제 |
324 | 324 |
TempFile.DelTemp(a.ID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
325 | 325 |
}); |
... | ... | |
422 | 422 |
////GC.Collect(); |
423 | 423 |
} |
424 | 424 |
|
425 |
public List<CommentUserInfo> AddAdorner() |
|
426 |
{ |
|
427 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
428 |
|
|
429 |
if (SelectLayer.Children.Count > 0) |
|
430 |
{ |
|
431 |
foreach (var item in SelectLayer.Children) |
|
432 |
{ |
|
433 |
if (item.GetType().Name == "AdornerFinal") |
|
434 |
{ |
|
435 |
(item as AdornerFinal).unRegister(); |
|
436 |
|
|
437 |
foreach (var InnerItem in (item as AdornerFinal).MemberSet.Cast<AdornerMember>()) |
|
438 |
{ |
|
439 |
if (!ViewerDataModel.Instance.MarkupControls_USER.Contains(InnerItem.DrawingData)) |
|
440 |
{ |
|
441 |
adornerSet.Add(InnerItem.DrawingData as CommentUserInfo); |
|
442 |
} |
|
443 |
|
|
444 |
Control_Style(InnerItem.DrawingData as CommentUserInfo); |
|
445 |
|
|
446 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
447 |
multi_Undo_Data = new Multi_Undo_data(); |
|
448 |
} |
|
449 |
} |
|
450 |
} |
|
451 |
SelectLayer.Children.Clear(); |
|
452 |
} |
|
453 |
return adornerSet; |
|
454 |
} |
|
455 |
|
|
456 |
public void ChangeCommentReact() |
|
425 |
/// <summary> |
|
426 |
/// update my markuplist |
|
427 |
/// - update existing markup data if already exist |
|
428 |
/// - add new markup data if control is new |
|
429 |
/// </summary> |
|
430 |
public void UpdateMyMarkupList() |
|
457 | 431 |
{ |
458 | 432 |
Logger.sendCheckLog("pageNavigator_PageChanging_ChangeCommentReact", 1); |
459 | 433 |
bool isComingNewBie = false; |
460 | 434 |
|
461 |
if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0) |
|
435 |
/// add or update markup list |
|
436 |
foreach (var control in ViewerDataModel.Instance.MarkupControls_USER) |
|
462 | 437 |
{ |
463 |
foreach (var control in ViewerDataModel.Instance.MarkupControls_USER) |
|
464 |
{ |
|
465 |
var root = MarkupParser.MarkupToString(control, App.ViewInfo.UserID); |
|
438 |
var root = MarkupParser.MarkupToString(control, App.ViewInfo.UserID); |
|
466 | 439 |
|
467 |
var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault(); |
|
468 |
if (existItem != null) //신규 추가 된 코멘트 |
|
440 |
var exist = ViewerDataModel.Instance.MyMarkupList.Where(data => data.ID == root.CommentID).FirstOrDefault(); |
|
441 |
if (exist != null) //신규 추가 된 코멘트 |
|
442 |
{ |
|
443 |
if (exist.Data != root.ConvertData) //코멘트가 같은지 |
|
469 | 444 |
{ |
470 |
if (existItem.Data != root.ConvertData) //코멘트가 같은지 |
|
471 |
{ |
|
472 |
existItem.Data = root.ConvertData; |
|
473 |
existItem.IsUpdate = true; |
|
474 |
ComingNewBieEnd = false; |
|
475 |
} |
|
445 |
exist.Data = root.ConvertData; |
|
446 |
exist.IsUpdate = true; |
|
447 |
ComingNewBieEnd = false; |
|
476 | 448 |
} |
477 |
else |
|
449 |
} |
|
450 |
else if (root.CommentID != null) |
|
451 |
{ |
|
452 |
isComingNewBie = true; |
|
453 |
ViewerDataModel.Instance.MyMarkupList.Add(new MarkupItemEx |
|
478 | 454 |
{ |
479 |
if (root.CommentID != null) |
|
480 |
{ |
|
481 |
isComingNewBie = true; |
|
482 |
var currentCommentCheck = ViewerDataModel.Instance.MarkupList_USER.Where(dt => dt.ID == control.CommentID).FirstOrDefault(); |
|
483 |
if (currentCommentCheck != null) |
|
484 |
{ |
|
485 |
currentCommentCheck.Data = root.ConvertData; |
|
486 |
} |
|
487 |
else |
|
488 |
{ |
|
489 |
ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx |
|
490 |
{ |
|
491 |
ID = control.CommentID, |
|
492 |
Data = root.ConvertData, |
|
493 |
Data_Type = root.DATA_TYPE, |
|
494 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
495 |
PageNumber = this.pageNavigator.CurrentPage.PageNumber, |
|
496 |
Symbol_ID = control.SymbolID, |
|
497 |
Group_ID = control.GroupID, |
|
498 |
}); |
|
499 |
ComingNewBieEnd = false; |
|
500 |
} |
|
501 |
} |
|
502 |
} |
|
455 |
ID = control.CommentID, |
|
456 |
Data = root.ConvertData, |
|
457 |
Data_Type = root.DATA_TYPE, |
|
458 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
459 |
PageNumber = this.pageNavigator.CurrentPage.PageNumber, |
|
460 |
Symbol_ID = control.SymbolID, |
|
461 |
Group_ID = control.GroupID, |
|
462 |
}); |
|
463 |
ComingNewBieEnd = false; |
|
503 | 464 |
} |
504 | 465 |
} |
505 | 466 |
|
467 |
/// delete markup list |
|
468 |
int iPageNo = Convert.ToInt32(this.ParentOfType<MainWindow>().dzTopMenu.tlcurrentPage.Text); |
|
469 |
var deleted = (from markup in ViewerDataModel.Instance.MyMarkupList |
|
470 |
where (markup.PageNumber == iPageNo) && (null == ViewerDataModel.Instance.MarkupControls_USER.Where(control => control.CommentID == markup.ID).FirstOrDefault()) |
|
471 |
select markup).ToList(); |
|
472 |
foreach(var markup in deleted) ViewerDataModel.Instance.MyMarkupList.Remove(markup); |
|
473 |
/// up to here |
|
506 | 474 |
|
507 | 475 |
if (PreviewUserMarkupInfoItem != null && isComingNewBie && !ComingNewBieEnd) |
508 | 476 |
{ |
... | ... | |
534 | 502 |
InkControl_Convert(); |
535 | 503 |
|
536 | 504 |
SelectionSet.Instance.UnSelect(this); |
537 |
ChangeCommentReact();
|
|
505 |
UpdateMyMarkupList();
|
|
538 | 506 |
|
539 | 507 |
Logger.sendCheckLog("pageNavigator_PageChanging_변수생성 및 값 설정", 1); |
540 | 508 |
CompareMode.IsChecked = false; |
... | ... | |
703 | 671 |
{ |
704 | 672 |
zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height }); |
705 | 673 |
} |
706 |
Logger.sendCheckLog("pageNavigator_PageChanging_ControlData Setting", 1); |
|
707 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Clear(); //전체 제거 |
|
708 |
Common.ViewerDataModel.Instance.MarkupControls.Clear(); //전체 제거 |
|
709 | 674 |
|
710 |
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업 |
|
675 |
Logger.sendCheckLog("-- pageNavigator_PageChanging_ControlData Setting --", 1); |
|
676 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Clear(); //전체 제거 |
|
677 |
Common.ViewerDataModel.Instance.MarkupControls.Clear(); //전체 제거 |
|
711 | 678 |
|
712 |
foreach (var item in gridSelectionItem) |
|
679 |
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업 |
|
680 |
foreach (var info in gridSelectionItem) |
|
713 | 681 |
{ |
714 |
if (item.UserID == App.ViewInfo.UserID) |
|
715 |
{ |
|
716 |
ViewerDataModel.Instance.current_page_commentcnt = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().Count; |
|
717 |
ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem) |
|
718 |
{ |
|
719 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", |
|
720 |
item.MarkupInfoID, markupitem.ID); |
|
721 |
}); |
|
722 |
|
|
723 |
} |
|
724 |
else |
|
725 |
{ |
|
726 |
ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem) |
|
727 |
{ |
|
728 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID); |
|
729 |
}); |
|
730 |
} |
|
682 |
Logger.sendCheckLog(String.Format("==>{0}", info), 1); |
|
731 | 683 |
} |
684 |
/// fire selection event |
|
685 |
this.gridViewMarkup.UnselectAll(); |
|
686 |
this.gridViewMarkup.Select(gridSelectionItem); |
|
732 | 687 |
|
733 | 688 |
if (!testPanel2.IsHidden) |
734 | 689 |
{ |
... | ... | |
779 | 734 |
instance.SetColor = item.DisplayColor; |
780 | 735 |
if (item.UserID == App.ViewInfo.UserID && item.MarkupInfoID == item.MarkupInfoID) |
781 | 736 |
{ |
782 |
instance.PageNumber = ViewerDataModel.Instance.MarkupList_USER.Select(d => d.PageNumber).ToList();
|
|
737 |
instance.PageNumber = ViewerDataModel.Instance.MyMarkupList.Select(d => d.PageNumber).ToList();
|
|
783 | 738 |
} |
784 | 739 |
else |
785 | 740 |
{ |
... | ... | |
2871 | 2826 |
/// </summary> |
2872 | 2827 |
private void ApplyDragSelectionRect() |
2873 | 2828 |
{ |
2874 |
/* |
|
2875 |
multi_Undo_Data = new Multi_Undo_data(); |
|
2876 |
|
|
2877 |
UndoData = new Undo_data() |
|
2878 |
{ |
|
2879 |
IsUndo = false, |
|
2880 |
Event = Event_Type.Select, |
|
2881 |
EventTime = DateTime.Now, |
|
2882 |
Markup_List = new List<Multi_Undo_data>() |
|
2883 |
}; |
|
2884 |
*/ |
|
2885 |
|
|
2886 | 2829 |
dragSelectionBorder.Visibility = Visibility.Collapsed; |
2887 | 2830 |
|
2888 | 2831 |
double x = Canvas.GetLeft(dragSelectionBorder); |
... | ... | |
2908 | 2851 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
2909 | 2852 |
|
2910 | 2853 |
Control_Style(item); |
2911 |
/* |
|
2912 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
2913 |
multi_Undo_Data = new Multi_Undo_data(); |
|
2914 |
if (item.GroupID > 0) |
|
2915 |
{ |
|
2916 |
|
|
2917 |
} |
|
2918 |
*/ |
|
2919 | 2854 |
} |
2920 | 2855 |
} |
2921 | 2856 |
if (adornerSet.Count > 0) |
2922 | 2857 |
{ |
2923 |
/* |
|
2924 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
2925 |
{ |
|
2926 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
2927 |
}); |
|
2928 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
2929 |
*/ |
|
2930 |
|
|
2931 | 2858 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
2932 | 2859 |
SelectLayer.Children.Add(final); |
2933 | 2860 |
} |
... | ... | |
3174 | 3101 |
|
3175 | 3102 |
InkControl_Convert(); |
3176 | 3103 |
|
3104 |
///TODO: |
|
3177 | 3105 |
var text_item = ViewerDataModel.Instance.MarkupControls_USER.Where(data => |
3178 | 3106 |
(data as TextControl) != null && (data as TextControl).Text == "" || (data as ArrowTextControl) != null && (data as ArrowTextControl).ArrowText == "").FirstOrDefault(); |
3179 | 3107 |
|
... | ... | |
3181 | 3109 |
{ |
3182 | 3110 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(text_item); |
3183 | 3111 |
} |
3112 |
/// up to here |
|
3184 | 3113 |
|
3185 | 3114 |
foreach (var arrow_text in ViewerDataModel.Instance.MarkupControls_USER) |
3186 | 3115 |
{ |
... | ... | |
3326 | 3255 |
var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault(); |
3327 | 3256 |
if (control != null) |
3328 | 3257 |
{ |
3329 |
//강인구 추가 컨트롤 누르고 멀티 선택(다시확인필요) |
|
3330 |
AdornerFinal final; |
|
3331 |
List<Point> p_set = new List<Point>(); |
|
3332 |
List<CommentUserInfo> comment = new List<CommentUserInfo>(); |
|
3333 |
ViewerDataModel.Instance.MarkupControls.Remove(control); |
|
3334 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
3335 |
multi_Undo_Data = new Multi_Undo_data(); |
|
3336 |
|
|
3337 |
//강인구 Undo/Redo 보류 |
|
3338 |
UndoData = new Undo_data() |
|
3339 |
{ |
|
3340 |
IsUndo = false, |
|
3341 |
Event = Event_Type.Select, |
|
3342 |
EventTime = DateTime.Now, |
|
3343 |
Markup_List = new List<Multi_Undo_data>() |
|
3344 |
}; |
|
3258 |
AdornerFinal final = null; |
|
3345 | 3259 |
|
3346 | 3260 |
if (!ViewerDataModel.Instance.IsPressCtrl) |
3347 | 3261 |
{ |
3262 |
/// 기존 selection 해제 |
|
3348 | 3263 |
SelectionSet.Instance.UnSelect(this); |
3264 |
|
|
3349 | 3265 |
final = new AdornerFinal(control); |
3350 |
//단일 컨트롤 언두 저장 |
|
3351 | 3266 |
|
3352 | 3267 |
Control_Style(control); |
3353 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
3354 | 3268 |
|
3355 | 3269 |
if ((control as IPath) != null) |
3356 | 3270 |
{ |
... | ... | |
3464 | 3378 |
{ |
3465 | 3379 |
ViewerDataModel.Instance.ArcLength = (control as CloudControl).ArcLength; |
3466 | 3380 |
} |
3467 |
|
|
3468 | 3381 |
} |
3469 | 3382 |
else |
3470 | 3383 |
{ |
3471 |
comment = AddAdorner(); |
|
3384 |
List<CommentUserInfo> comment = SelectionSet.Instance.SelectedItems; |
|
3385 |
SelectionSet.Instance.UnSelect(this); |
|
3472 | 3386 |
comment.Add(control); |
3473 | 3387 |
|
3474 | 3388 |
Control_Style(control); |
3475 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
3476 | 3389 |
|
3477 | 3390 |
final = new AdornerFinal(comment); |
3478 |
//다중 컨트롤 언두 저장 |
|
3479 | 3391 |
} |
3480 | 3392 |
|
3481 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
3482 |
{ |
|
3483 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
3484 |
}); |
|
3485 |
|
|
3486 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
3487 |
|
|
3488 |
SelectLayer.Children.Add(final); |
|
3393 |
if(final != null) this.SelectLayer.Children.Add(final); |
|
3489 | 3394 |
} |
3490 | 3395 |
} |
3491 | 3396 |
else if (mouseHandlingMode == MouseHandlingMode.Drawing) |
... | ... | |
3557 | 3462 |
else |
3558 | 3463 |
{ |
3559 | 3464 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); |
3560 |
if (ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber
|
|
3465 |
if (ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber
|
|
3561 | 3466 |
&& d.Data_Type == Convert.ToInt32(MarkupToPDF.Controls.Common.ControlType.Coordinate)).Count() > 0) |
3562 | 3467 |
{ |
3563 | 3468 |
currentControl = null; |
... | ... | |
5122 | 5027 |
multi_Undo_Data = new Multi_Undo_data(); |
5123 | 5028 |
|
5124 | 5029 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
5125 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
5126 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
5030 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
5031 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
5127 | 5032 |
|
5128 | 5033 |
//임시파일에서도 삭제한다. |
5129 | 5034 |
TempFile.DelTemp((control as MarkupToPDF.Common.CommentUserInfo).CommentID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
... | ... | |
5175 | 5080 |
|
5176 | 5081 |
public void TeamConsolidationMethod() |
5177 | 5082 |
{ |
5178 |
ChangeCommentReact();
|
|
5083 |
UpdateMyMarkupList();
|
|
5179 | 5084 |
if (this.gridViewMarkup.SelectedItems.Count == 0) |
5180 | 5085 |
{ |
5181 | 5086 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Please select at least one user", "Alert"); |
... | ... | |
5322 | 5227 |
|
5323 | 5228 |
private void ConsolidateFinalPDFEvent(object sender, RoutedEventArgs e) |
5324 | 5229 |
{ |
5325 |
ChangeCommentReact();
|
|
5230 |
UpdateMyMarkupList();
|
|
5326 | 5231 |
|
5327 | 5232 |
if (this.gridViewMarkup.SelectedItems.Count == 0) |
5328 | 5233 |
{ |
... | ... | |
6731 | 6636 |
} |
6732 | 6637 |
} |
6733 | 6638 |
} |
6734 |
public void EmptyControlCheck() |
|
6735 |
{ |
|
6736 |
for (var j = 0; j < (Common.ViewerDataModel.Instance.MarkupControls_USER).Count; j++) |
|
6737 |
{ |
|
6738 |
if (((Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).GetType().Name == "TextControl") |
|
6739 |
{ |
|
6740 |
if (((MarkupToPDF.Controls.Text.TextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Text == null |
|
6741 |
|| ((MarkupToPDF.Controls.Text.TextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Text == "") |
|
6742 |
{ |
|
6743 |
Common.ViewerDataModel.Instance.MarkupControls_USER.RemoveAt(j); |
|
6744 |
} |
|
6745 |
} |
|
6746 |
else if (((Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).GetType().Name == "ArrowTextControl") |
|
6747 |
{ |
|
6748 |
if (((MarkupToPDF.Controls.Text.ArrowTextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Base_TextBox.Text == null |
|
6749 |
|| ((MarkupToPDF.Controls.Text.ArrowTextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Base_TextBox.Text == "") |
|
6750 |
{ |
|
6751 |
Common.ViewerDataModel.Instance.MarkupControls_USER.RemoveAt(j); |
|
6752 |
} |
|
6753 |
} |
|
6754 |
} |
|
6755 |
} |
|
6639 |
|
|
6756 | 6640 |
public void InkControl_Convert() |
6757 | 6641 |
{ |
6758 | 6642 |
Logger.sendCheckLog("pageNavigator_PageChanging_InkControl_Convert", 1); |
내보내기 Unified diff