Ejemplo n.º 1
0
 /// <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();
 }
Ejemplo n.º 2
0
        public void TestAdd()
        {
            commandsList.Add(command1);

            Assert.IsTrue(commandsList.CanUndo);
            Assert.IsFalse(commandsList.CanRedo);
            Assert.AreEqual(commandsList.UndoMsg, UNDO_STRING + COMMAND_NAME1);
        }