Beispiel #1
0
 public void Add(Command command)
 {
     if (tempCompoundCommand != null)
     {
         tempCompoundCommand.Add(command);
     }
     else
     {
         commands.Push(command);
         command.Owner = Owner;
     }
 }
Beispiel #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;
     }
 }