| | |
| | | using Hydro.Core; |
| | | using System; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using Yw.WinFrmUI.Q3d; |
| | | |
| | | namespace Hydro.MapView.Common |
| | | namespace Yw.WinFrmUI.Q3d |
| | | { |
| | | public class UndoRedoCommand<T> |
| | | { |
| | |
| | | case "Add": |
| | | { |
| | | |
| | | var net = o as MapViewNetWork; |
| | | var net = o as NetworkViewModel; |
| | | var undoAction = new Action<object>(v => net.Remove(newValue)); |
| | | var redoAction = new Action<object>(v => net.Add(newValue)); |
| | | //object oldValue=propertyDescriptor.GetValue(obj); |
| | |
| | | return; |
| | | case "Remove": |
| | | { |
| | | var net = o as MapViewNetWork; |
| | | var net = o as NetworkViewModel; |
| | | var undoAction = new Action<object>(v => net.Add(newValue)); |
| | | var redoAction = new Action<object>(v => net.Remove(newValue)); |
| | | //object oldValue=propertyDescriptor.GetValue(obj); |