/// <summary> /// All-in-one method to add a command to the stack. /// The method will be executed after it's been added to the stack. /// </summary> /// <param name="cmd">The command record.</param> internal static void Execute(Core.ICommand cmd) { cmd.Redo(); if (cmd is Core.ICommand) { undoStack.Push(cmd); undoStackNames.Insert(0, cmd.Text); } }