示例#1
0
 public void Redo()
 {
     if (historyStacks.Count > 0)
     {
         UndoableCommand command = historyStacks.Pop() as UndoableCommand;
         commandStacks.Push(command);
         command.execute();
     }
 }
示例#2
0
 public void Undo()
 {
     if (commandStacks.Count > 0)
     {
         UndoableCommand command = commandStacks.Pop() as UndoableCommand;
         historyStacks.Push(command);
         command.Undo();
     }
 }