Пример #1
0
        /// <summary>
        ///     添加新命令并执行之
        /// </summary>
        /// <param name="command"></param>
        public ICommandPattern AddCommand(ICommandPattern command)
        {
            var commandNode = new LinkedListNode <ICommandPattern>(command);

            if (CurrentCommand != null)
            {
                Commands.AddAfter(CurrentCommand, commandNode);
            }
            else
            {
                Commands.AddFirst(commandNode);
            }
            CurrentCommand = commandNode;
            return(command);
        }
Пример #2
0
 public void AddCommand(ICommandPattern cmd)
 {
     lst.Add(cmd);
 }