Beispiel #1
0
 public void execute(AbstractCommand command)
 {
     if (command.undoable())
     {
         undo_commands.Push(command);
     }
     command.execute();
 }
Beispiel #2
0
        public void redo()
        {
            if (redo_commands.Count == 0)
            {
                System.Console.WriteLine("No command exist for redo");
                return;
            }

            AbstractCommand cmd = redo_commands.Pop();

            undo_commands.Push(cmd);
            cmd.redo();
        }