public void Undo() { if (doneCommands.Count <= 0) { return; } EditorCommand command = doneCommands.Pop(); command.Revertir(); undoneCommands.Push(command); }
public void Redo() { if (undoneCommands.Count <= 0) { return; } EditorCommand command = undoneCommands.Pop(); command.Ejecutar(); doneCommands.Push(command); }
public void Do(EditorCommand command) { command.Ejecutar(); doneCommands.Push(command); undoneCommands.Clear(); }