public void AddCommand(CommandBase command, bool doExecute) { if (commandSet == null) { undoneCommands.Clear(); if (doExecute) { command.Execute(); } doneCommands.Push(command); } else { commandSet.AddCommand(command); } OnModified(); }
public void AddCommand(CommandBase command) { list.Add(command); command.Execute(); }