Esempio n. 1
0
 public static void PushAndDoAction(this IUndoEngine engine, Action doAction, Action undoAction, bool recordUndo)
 {
     if (recordUndo)
     {
         engine.PushAndDoAction(doAction, undoAction);
     }
     else
     {
         doAction();
     }
 }
Esempio n. 2
0
 public static ILocalDragger <T> Undo <T>(IUndoEngine undo, ILocalDragger <T> effector)
     where T : struct =>
 new UndoDragger <T>(undo, effector);
Esempio n. 3
0
 public UndoDragger(IUndoEngine undo, ILocalDragger <T> effector)
 {
     this.undo     = undo;
     this.effector = effector;
 }
Esempio n. 4
0
 public static void PushToggleAction(this IUndoEngine engine, Action doUndoAction)
 {
     engine.PushAndDoAction(doUndoAction, doUndoAction);
 }
Esempio n. 5
0
 public UndoUnit(IUndoEngine undoEngine, string name) : this(name)
 {
     _undoEngine = undoEngine;
 }