개정판 3b484ebb
issue #000: Temp 관련 기능 TempFile Class로 이동 및 수정
Change-Id: If6157c1c9ae87400128ed1d69e24afa60f4dd7bb
KCOM/Common/TempFile.cs | ||
---|---|---|
21 | 21 |
using System.Text; |
22 | 22 |
using System.Windows; |
23 | 23 |
using System.Windows.Media; |
24 |
using System.Windows.Threading; |
|
24 | 25 |
using System.Xml; |
25 | 26 |
using System.Xml.Serialization; |
26 | 27 |
|
... | ... | |
32 | 33 |
public static string PathString = Path.GetTempPath() + "\\MARKUS"; |
33 | 34 |
public static string FilePath = PathString + "\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
34 | 35 |
|
35 |
internal static void WriteTemp(List<MainMenu.TempDt> tempDtList)
|
|
36 |
internal static void WriteTemp(List<TempDt> tempDtList) |
|
36 | 37 |
{ |
37 | 38 |
if (tempDtList.Count > 0) |
38 | 39 |
{ |
... | ... | |
292 | 293 |
xmlDoc.Save(FilePath); |
293 | 294 |
xmlDoc = null; |
294 | 295 |
} |
295 |
} |
|
296 |
|
|
297 |
public class TempLoadData |
|
298 |
{ |
|
299 |
public int PageNumber { get; set; } |
|
300 |
public string CommentID { get; set; } |
|
301 |
public string ConvertData { get; set; } |
|
302 |
public string DATA_TYPE { get; set; } |
|
303 |
public string MarkupInfoID { get; set; } |
|
304 |
public int IsUpdate { get; set; } |
|
305 |
} |
|
306 |
|
|
307 |
static List<TempLoadData> tempLoadData = new List<TempLoadData>(); |
|
308 |
|
|
309 |
|
|
310 |
public static Undo_data UndoData { get; set; } |
|
311 |
|
|
312 |
public class TempDt |
|
313 |
{ |
|
314 |
public int PageNumber { get; set; } |
|
315 |
public string CommentID { get; set; } |
|
316 |
public string ConvertData { get; set; } |
|
317 |
public int DATA_TYPE { get; set; } |
|
318 |
public string MarkupInfoID { get; set; } |
|
319 |
public int IsUpdate { get; set; } |
|
320 |
} |
|
321 |
|
|
322 |
public static List<TempDt> tempDtList = new List<TempDt>(); |
|
323 |
|
|
324 |
public static void TempLoad() |
|
325 |
{ |
|
326 |
if ((System.IO.File.Exists(FilePath)) == true) |
|
327 |
{ |
|
328 |
XmlDocument xdoc = new XmlDocument(); |
|
329 |
xdoc.Load(FilePath); |
|
330 |
XmlNodeList nodes = xdoc.SelectNodes("/Root/CommentID"); |
|
331 |
int PageNumber = 0; |
|
332 |
if (nodes.Count > 0) |
|
333 |
{ |
|
334 |
if (MessageBox.Show("저장하지 못한 데이터가 있습니다. 불러오시겠습니까?", "MARKUS", MessageBoxButton.OKCancel) == MessageBoxResult.OK) |
|
335 |
{ |
|
336 |
foreach (XmlNode node in nodes) |
|
337 |
{ |
|
338 |
string CommentID = node.Attributes["Value"].Value; |
|
339 |
string ConvertData = node.SelectSingleNode("ConvertData").InnerText; |
|
340 |
string DATA_TYPE = node.SelectSingleNode("DATA_TYPE").InnerText; |
|
341 |
string MarkupInfoID = node.SelectSingleNode("MarkupInfoID").InnerText; |
|
342 |
int IsUpdate = Convert.ToInt32(node.SelectSingleNode("IsUpdate").InnerText); |
|
343 |
PageNumber = Convert.ToInt32(node.SelectSingleNode("PageNumber").InnerText); |
|
344 |
|
|
345 |
tempLoadData.Add(new TempLoadData() |
|
346 |
{ |
|
347 |
PageNumber = PageNumber, |
|
348 |
CommentID = CommentID, |
|
349 |
ConvertData = ConvertData, |
|
350 |
DATA_TYPE = DATA_TYPE, |
|
351 |
MarkupInfoID = MarkupInfoID, |
|
352 |
IsUpdate = IsUpdate |
|
353 |
}); |
|
354 |
} |
|
355 |
|
|
356 |
if (PageNumber > 0) |
|
357 |
{ |
|
358 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.GotoPage(PageNumber); |
|
359 |
} |
|
360 |
|
|
361 |
// Temp Object add |
|
362 |
if (Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber == PageNumber) |
|
363 |
{ |
|
364 |
TempControlLoad(); |
|
365 |
} |
|
366 |
tempLoadData.Clear(); |
|
367 |
} |
|
368 |
} |
|
369 |
else //파일 삭제 |
|
370 |
{ |
|
371 |
TempFile.Remove(); |
|
372 |
} |
|
373 |
} |
|
374 |
} |
|
375 |
|
|
376 |
|
|
377 |
//Temp Control Load |
|
378 |
public static void TempControlLoad() |
|
379 |
{ |
|
380 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
381 |
|
|
382 |
for (int k = 0; k < tempLoadData.Count; k++) |
|
383 |
{ |
|
384 |
System.Windows.Controls.Control item = null; |
|
385 |
Multi_Undo_data multi_Undo_Data; |
|
386 |
|
|
387 |
|
|
388 |
switch (tempLoadData[k].IsUpdate) |
|
389 |
{ |
|
390 |
case 0://추가 |
|
391 |
var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.CommentID == tempLoadData[k].CommentID).FirstOrDefault(); |
|
392 |
if (control != null) |
|
393 |
{ |
|
394 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
395 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
396 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
397 |
} |
|
398 |
|
|
399 |
//Control |
|
400 |
item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID); |
|
401 |
|
|
402 |
UndoData = new Undo_data() |
|
403 |
{ |
|
404 |
IsUndo = false, |
|
405 |
Event = Event_Type.Create, |
|
406 |
EventTime = DateTime.Now, |
|
407 |
Opacity = ViewerDataModel.Instance.ControlOpacity, |
|
408 |
Markup_List = new List<Multi_Undo_data>() |
|
409 |
}; |
|
410 |
|
|
411 |
multi_Undo_Data = new Multi_Undo_data(); |
|
412 |
multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
413 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
414 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
415 |
break; |
|
416 |
case 1://수정 |
|
417 |
control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.CommentID == tempLoadData[k].CommentID).FirstOrDefault(); |
|
418 |
if (control != null) |
|
419 |
{ |
|
420 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
421 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
422 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
423 |
} |
|
424 |
|
|
425 |
//Control |
|
426 |
item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID); |
|
427 |
|
|
428 |
UndoData = new Undo_data() |
|
429 |
{ |
|
430 |
IsUndo = false, |
|
431 |
Event = Event_Type.Thumb, |
|
432 |
EventTime = DateTime.Now, |
|
433 |
Opacity = ViewerDataModel.Instance.ControlOpacity, |
|
434 |
Markup_List = new List<Multi_Undo_data>() |
|
435 |
}; |
|
436 |
|
|
437 |
multi_Undo_Data = new Multi_Undo_data(); |
|
438 |
multi_Undo_Data = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
439 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
440 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
441 |
break; |
|
442 |
case 2://삭제 |
|
443 |
|
|
444 |
control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.CommentID == tempLoadData[k].CommentID).FirstOrDefault(); |
|
445 |
if (control != null) |
|
446 |
{ |
|
447 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
448 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
449 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
450 |
} |
|
451 |
break; |
|
452 |
} |
|
453 |
} |
|
454 |
} |
|
455 |
// public static Dispatcher Dispatcher { get; } |
|
456 |
public static void TempFileAdd() |
|
457 |
{ |
|
458 |
System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate |
|
459 |
{ |
|
460 |
if (ViewerDataModel.Instance.UndoDataList.Count > 0) |
|
461 |
{ |
|
462 |
DateTime undoTime = ViewerDataModel.Instance.UndoDataList.OrderByDescending(order => order.EventTime).FirstOrDefault().EventTime; |
|
463 |
DateTime updatetime = DateTime.Now.AddDays(-1); |
|
464 |
if (ViewerDataModel.Instance._markupInfoList.Count > 0) |
|
465 |
{ |
|
466 |
updatetime = ViewerDataModel.Instance._markupInfoList.OrderByDescending(order => order.UpdateTime).FirstOrDefault().UpdateTime; |
|
467 |
} |
|
468 |
|
|
469 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.EmptyControlCheck(); |
|
470 |
|
|
471 |
if (undoTime > updatetime) |
|
472 |
{ |
|
473 |
if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0) |
|
474 |
{ |
|
475 |
foreach (var control in ViewerDataModel.Instance.MarkupControls_USER) |
|
476 |
{ |
|
477 |
var root = MarkupParser.MarkupToString(control, App.ViewInfo.UserID); |
|
478 |
|
|
479 |
var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault(); |
|
480 |
if (existItem != null) |
|
481 |
{ |
|
482 |
if (existItem.Data != root.ConvertData) |
|
483 |
{ |
|
484 |
tempDtList.Add(new TempDt() |
|
485 |
{ |
|
486 |
CommentID = control.CommentID, |
|
487 |
ConvertData = root.ConvertData, |
|
488 |
DATA_TYPE = root.DATA_TYPE, |
|
489 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
490 |
PageNumber = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber, |
|
491 |
IsUpdate = 1 |
|
492 |
}); |
|
493 |
} |
|
494 |
} |
|
495 |
else //신규 추가 된 코멘트 |
|
496 |
{ |
|
497 |
if (root.CommentID != null) |
|
498 |
{ |
|
499 |
var currentCommentCheck = ViewerDataModel.Instance.MarkupList_USER.Where(dt => dt.ID == control.CommentID).FirstOrDefault(); |
|
500 |
if (currentCommentCheck != null) |
|
501 |
{ |
|
502 |
tempDtList.Add(new TempDt() |
|
503 |
{ |
|
504 |
CommentID = control.CommentID, |
|
505 |
ConvertData = root.ConvertData, |
|
506 |
DATA_TYPE = root.DATA_TYPE, |
|
507 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
508 |
PageNumber = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber, |
|
509 |
IsUpdate = 1 |
|
510 |
}); |
|
511 |
} |
|
512 |
else |
|
513 |
{ |
|
514 |
tempDtList.Add(new TempDt() |
|
515 |
{ |
|
516 |
CommentID = control.CommentID, |
|
517 |
ConvertData = root.ConvertData, |
|
518 |
DATA_TYPE = root.DATA_TYPE, |
|
519 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
520 |
PageNumber = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber, |
|
521 |
IsUpdate = 0 |
|
522 |
}); |
|
523 |
} |
|
524 |
} |
|
525 |
} |
|
526 |
} |
|
527 |
} |
|
528 |
|
|
529 |
WriteTemp(tempDtList); |
|
530 |
tempDtList.Clear(); |
|
531 |
} |
|
532 |
} |
|
533 |
})); |
|
534 |
|
|
535 |
} |
|
536 |
|
|
537 |
//public static string PathString = System.IO.Path.GetTempPath() + "\\MARKUS\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
|
538 |
|
|
539 |
} |
|
296 | 540 |
} |
297 | 541 |
|
KCOM/Services/BaseServices.cs | ||
---|---|---|
161 | 161 |
{ |
162 | 162 |
gridViewHistory.ItemsSource = e.Result; |
163 | 163 |
} |
164 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad();
|
|
164 |
TempFile.TempLoad();
|
|
165 | 165 |
} |
166 | 166 |
|
167 | 167 |
private void BaseClient_DeleteMarkupCompleted(object sender, DeleteMarkupCompletedEventArgs e) |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
407 | 407 |
{ |
408 | 408 |
Stopwatch sw = new Stopwatch(); |
409 | 409 |
sw.Start(); |
410 |
TempFileAdd(); |
|
410 |
TempFile.TempFileAdd();
|
|
411 | 411 |
sw.Stop(); |
412 | 412 |
|
413 | 413 |
Dispatcher.InvokeAsync(new Action(delegate |
... | ... | |
421 | 421 |
////GC.Collect(); |
422 | 422 |
} |
423 | 423 |
|
424 |
void TempFileAdd() |
|
425 |
{ |
|
426 |
Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate |
|
427 |
{ |
|
428 |
if (ViewerDataModel.Instance.UndoDataList.Count > 0) |
|
429 |
{ |
|
430 |
DateTime undoTime = ViewerDataModel.Instance.UndoDataList.OrderByDescending(order => order.EventTime).FirstOrDefault().EventTime; |
|
431 |
DateTime updatetime = DateTime.Now.AddDays(-1); |
|
432 |
if (ViewerDataModel.Instance._markupInfoList.Count > 0) |
|
433 |
{ |
|
434 |
updatetime = ViewerDataModel.Instance._markupInfoList.OrderByDescending(order => order.UpdateTime).FirstOrDefault().UpdateTime; |
|
435 |
} |
|
436 |
|
|
437 |
EmptyControlCheck(); |
|
438 |
|
|
439 |
if (undoTime > updatetime) |
|
440 |
{ |
|
441 |
if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0) |
|
442 |
{ |
|
443 |
foreach (var control in ViewerDataModel.Instance.MarkupControls_USER) |
|
444 |
{ |
|
445 |
var root = MarkupParser.MarkupToString(control, App.ViewInfo.UserID); |
|
446 |
|
|
447 |
var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault(); |
|
448 |
if (existItem != null) |
|
449 |
{ |
|
450 |
if (existItem.Data != root.ConvertData) |
|
451 |
{ |
|
452 |
tempDtList.Add(new TempDt() |
|
453 |
{ |
|
454 |
CommentID = control.CommentID, |
|
455 |
ConvertData = root.ConvertData, |
|
456 |
DATA_TYPE = root.DATA_TYPE, |
|
457 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
458 |
PageNumber = this.pageNavigator.CurrentPage.PageNumber, |
|
459 |
IsUpdate = 1 |
|
460 |
}); |
|
461 |
} |
|
462 |
} |
|
463 |
else //신규 추가 된 코멘트 |
|
464 |
{ |
|
465 |
if (root.CommentID != null) |
|
466 |
{ |
|
467 |
var currentCommentCheck = ViewerDataModel.Instance.MarkupList_USER.Where(dt => dt.ID == control.CommentID).FirstOrDefault(); |
|
468 |
if (currentCommentCheck != null) |
|
469 |
{ |
|
470 |
tempDtList.Add(new TempDt() |
|
471 |
{ |
|
472 |
CommentID = control.CommentID, |
|
473 |
ConvertData = root.ConvertData, |
|
474 |
DATA_TYPE = root.DATA_TYPE, |
|
475 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
476 |
PageNumber = this.pageNavigator.CurrentPage.PageNumber, |
|
477 |
IsUpdate = 1 |
|
478 |
}); |
|
479 |
} |
|
480 |
else |
|
481 |
{ |
|
482 |
tempDtList.Add(new TempDt() |
|
483 |
{ |
|
484 |
CommentID = control.CommentID, |
|
485 |
ConvertData = root.ConvertData, |
|
486 |
DATA_TYPE = root.DATA_TYPE, |
|
487 |
MarkupInfoID = App.Custom_ViewInfoId, |
|
488 |
PageNumber = this.pageNavigator.CurrentPage.PageNumber, |
|
489 |
IsUpdate = 0 |
|
490 |
}); |
|
491 |
} |
|
492 |
} |
|
493 |
} |
|
494 |
} |
|
495 |
} |
|
496 |
|
|
497 |
TempFile.WriteTemp(tempDtList); |
|
498 |
tempDtList.Clear(); |
|
499 |
} |
|
500 |
} |
|
501 |
})); |
|
502 |
|
|
503 |
} |
|
504 |
|
|
505 |
|
|
506 |
public class TempLoadData |
|
507 |
{ |
|
508 |
public int PageNumber { get; set; } |
|
509 |
public string CommentID { get; set; } |
|
510 |
public string ConvertData { get; set; } |
|
511 |
public string DATA_TYPE { get; set; } |
|
512 |
public string MarkupInfoID { get; set; } |
|
513 |
public int IsUpdate { get; set; } |
|
514 |
} |
|
515 |
|
|
516 |
List<TempLoadData> tempLoadData = new List<TempLoadData>(); |
|
517 |
//public string FilePath = AppDomain.CurrentDomain.BaseDirectory + "Temp\\" + ; |
|
518 |
public static string PathString = System.IO.Path.GetTempPath() + "\\MARKUS\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
|
519 |
|
|
520 |
public void TempLoad() |
|
521 |
{ |
|
522 |
if ((System.IO.File.Exists(FilePath)) == true) |
|
523 |
{ |
|
524 |
XmlDocument xdoc = new XmlDocument(); |
|
525 |
xdoc.Load(FilePath); |
|
526 |
XmlNodeList nodes = xdoc.SelectNodes("/Root/CommentID"); |
|
527 |
int PageNumber = 0; |
|
528 |
if (nodes.Count > 0) |
|
529 |
{ |
|
530 |
if (MessageBox.Show("저장하지 못한 데이터가 있습니다. 불러오시겠습니까?", "MARKUS", MessageBoxButton.OKCancel) == MessageBoxResult.OK) |
|
531 |
{ |
|
532 |
foreach (XmlNode node in nodes) |
|
533 |
{ |
|
534 |
string CommentID = node.Attributes["Value"].Value; |
|
535 |
string ConvertData = node.SelectSingleNode("ConvertData").InnerText; |
|
536 |
string DATA_TYPE = node.SelectSingleNode("DATA_TYPE").InnerText; |
|
537 |
string MarkupInfoID = node.SelectSingleNode("MarkupInfoID").InnerText; |
|
538 |
int IsUpdate = Convert.ToInt32(node.SelectSingleNode("IsUpdate").InnerText); |
|
539 |
PageNumber = Convert.ToInt32(node.SelectSingleNode("PageNumber").InnerText); |
|
540 |
|
|
541 |
tempLoadData.Add(new TempLoadData() |
|
542 |
{ |
|
543 |
PageNumber = PageNumber, |
|
544 |
CommentID = CommentID, |
|
545 |
ConvertData = ConvertData, |
|
546 |
DATA_TYPE = DATA_TYPE, |
|
547 |
MarkupInfoID = MarkupInfoID, |
|
548 |
IsUpdate = IsUpdate |
|
549 |
}); |
|
550 |
} |
|
551 |
|
|
552 |
if (PageNumber > 0) |
|
553 |
{ |
|
554 |
this.pageNavigator.GotoPage(PageNumber); |
|
555 |
} |
|
556 |
|
|
557 |
// Temp Object add |
|
558 |
if (pageNavigator.CurrentPage.PageNumber == PageNumber) |
|
559 |
{ |
|
560 |
TempControlLoad(); |
|
561 |
} |
|
562 |
tempLoadData.Clear(); |
|
563 |
} |
|
564 |
} |
|
565 |
else //파일 삭제 |
|
566 |
{ |
|
567 |
TempFile.Remove(); |
|
568 |
} |
|
569 |
} |
|
570 |
} |
|
571 |
|
|
572 |
|
|
573 | 424 |
public void ReleaseAdorner() |
574 | 425 |
{ |
575 | 426 |
try |
... | ... | |
950 | 801 |
} |
951 | 802 |
|
952 | 803 |
|
953 |
//Temp Control Load |
|
954 |
public void TempControlLoad() |
|
955 |
{ |
|
956 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
957 |
|
|
958 |
for (int k = 0; k < tempLoadData.Count; k++) |
|
959 |
{ |
|
960 |
System.Windows.Controls.Control item = null; |
|
961 |
Multi_Undo_data multi_Undo_Data; |
|
962 |
|
|
963 |
|
|
964 |
switch (tempLoadData[k].IsUpdate) |
|
965 |
{ |
|
966 |
case 0://추가 |
|
967 |
var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.CommentID == tempLoadData[k].CommentID).FirstOrDefault(); |
|
968 |
if (control != null) |
|
969 |
{ |
|
970 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
971 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
972 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
973 |
} |
|
974 |
|
|
975 |
//Control |
|
976 |
item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID); |
|
977 |
|
|
978 |
UndoData = new Undo_data() |
|
979 |
{ |
|
980 |
IsUndo = false, |
|
981 |
Event = Event_Type.Create, |
|
982 |
EventTime = DateTime.Now, |
|
983 |
Opacity = ViewerDataModel.Instance.ControlOpacity, |
|
984 |
Markup_List = new List<Multi_Undo_data>() |
|
985 |
}; |
|
986 |
|
|
987 |
multi_Undo_Data = new Multi_Undo_data(); |
|
988 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
989 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
990 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
991 |
break; |
|
992 |
case 1://수정 |
|
993 |
control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.CommentID == tempLoadData[k].CommentID).FirstOrDefault(); |
|
994 |
if (control != null) |
|
995 |
{ |
|
996 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
997 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
998 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
999 |
} |
|
1000 |
|
|
1001 |
//Control |
|
1002 |
item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID); |
|
1003 |
|
|
1004 |
UndoData = new Undo_data() |
|
1005 |
{ |
|
1006 |
IsUndo = false, |
|
1007 |
Event = Event_Type.Thumb, |
|
1008 |
EventTime = DateTime.Now, |
|
1009 |
Opacity = ViewerDataModel.Instance.ControlOpacity, |
|
1010 |
Markup_List = new List<Multi_Undo_data>() |
|
1011 |
}; |
|
1012 |
|
|
1013 |
multi_Undo_Data = new Multi_Undo_data(); |
|
1014 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
1015 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
1016 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
1017 |
break; |
|
1018 |
case 2://삭제 |
|
1019 |
|
|
1020 |
control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.CommentID == tempLoadData[k].CommentID).FirstOrDefault(); |
|
1021 |
if (control != null) |
|
1022 |
{ |
|
1023 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(control); |
|
1024 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
1025 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
1026 |
} |
|
1027 |
break; |
|
1028 |
} |
|
1029 |
} |
|
1030 |
} |
|
804 |
|
|
1031 | 805 |
|
1032 | 806 |
private void SetCommentPages(bool onlyMe = false) |
1033 | 807 |
{ |
... | ... | |
6706 | 6480 |
} |
6707 | 6481 |
#endregion |
6708 | 6482 |
|
6709 |
TempFile temp = new TempFile(); |
|
6710 | 6483 |
//MarkupInfoItem |
6711 | 6484 |
public void CreateControl() |
6712 | 6485 |
{ |
내보내기 Unified diff