Exemplo n.º 1
0
 public void Add(Command command)
 {
     if (tempCompoundCommand != null)
     {
         tempCompoundCommand.Add(command);
     }
     else
     {
         commands.Push(command);
         command.Owner = Owner;
     }
 }
Exemplo n.º 2
0
 public void Add(Command command)
 {
     if (command == null)
     {
         return;
     }
     if (tempCompoundCommand != null)
     {
         tempCompoundCommand.Add(command);
     }
     else
     {
         redoStack.Clear();
         undoStack.Push(command);
         command.Owner = Owner;
     }
 }