개정판 34c8d43a
issue #823 symbol control redo, undo
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
2 | 2 |
using KCOM.Events; |
3 | 3 |
using KCOMDataModel.Common; |
4 | 4 |
using KCOMDataModel.DataModel; |
5 |
using MarkupToPDF.Common; |
|
5 | 6 |
using System; |
6 | 7 |
using System.Collections.Generic; |
7 | 8 |
using System.Linq; |
... | ... | |
316 | 317 |
} |
317 | 318 |
#endregion |
318 | 319 |
|
320 |
public Undo_data UndoData { get; set; } |
|
319 | 321 |
/// <summary> |
320 | 322 |
/// place symbol which has given id to original position which is created |
321 | 323 |
/// </summary> |
... | ... | |
345 | 347 |
string[] delimiterChars = { "|DZ|" }; |
346 | 348 |
string[] data = Data_.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
347 | 349 |
|
348 |
foreach (string parse in data) |
|
350 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
|
351 |
UndoData = new Undo_data() |
|
352 |
{ |
|
353 |
IsUndo = false, |
|
354 |
Event = Event_Type.Create, |
|
355 |
EventTime = DateTime.Now, |
|
356 |
Markup_List = new List<Multi_Undo_data>() |
|
357 |
}; |
|
358 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
|
359 |
{ |
|
360 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
361 |
}); |
|
362 |
|
|
363 |
foreach (string parse in data) |
|
349 | 364 |
{ |
350 | 365 |
if (parse != "") |
351 | 366 |
{ |
... | ... | |
356 | 371 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo); |
357 | 372 |
|
358 | 373 |
adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo); |
374 |
|
|
375 |
multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
376 |
|
|
377 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
378 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
359 | 379 |
} |
360 | 380 |
} |
361 | 381 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
내보내기 Unified diff