/// <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); }
public void AddCommand(ICommandPattern cmd) { lst.Add(cmd); }