예제 #1
0
        private bool CanPrint(CommandInfo commandInfo, Mode mode)
        {
            var previousCommands = new List<String>();
            foreach (var previousCommand in commandInfo.PreviousCommandNames)
            {
                var command = _container.Resolve<ICommand>(previousCommand);
                if (command.CanPrint(mode)) previousCommands.Add(previousCommand);
            }

            return previousCommands.Where(x => !_commandsAlreadyRun.ContainsKey(x)).Count() == 0;
        }
 public void RegisterCommand(int keyCode, CommandInfo commandInfo)
 {
     var response = _client.Post<CommandResponse>(String.Format("command/{0}", keyCode), commandInfo);
 }
예제 #3
0
 public void RegisterCommand(int keyCode, CommandInfo commandInfo)
 {
     _commandInfos.Add(keyCode, commandInfo);
 }