public void AddCommand(DeleteWidgetInGroupSubCommand cmd) { if (cmd == null) { return; } _cmdList.Add(cmd); }
public void Undo() { // Undo in the reverse order so that groups can be restore correctly for (int i = _cmdList.Count - 1; i >= 0; i--) { DeleteWidgetInGroupSubCommand cmd = _cmdList[i]; cmd.Undo(); } }