/// <summary> /// Adds the command to commands undo/redo list. /// </summary> /// <param name="command">The command.</param> private void AddCommand(ICommand command) { if (command != null) { command.Execute(); commandsList.Add(command); } SetBtnState(); }