Exemple #1
0
        public void DirectCommand(string[] input)
        {
            string inputHandler = input[0];

            try // Try running command.
            {
                if (CommandRespiratory.InputHandleExists(inputHandler))
                {
                    ICommand cmd = CommandRespiratory.GetFunction(inputHandler).Invoke(input.Skip(1).ToArray());
                    cmd.Execute();
                }
            }
            catch (CommandException e)
            {
                Console.WriteLine(e);
            }
        }
Exemple #2
0
 public CommandDirector(CommandRespiratory cr)
 {
     CommandRespiratory = cr;
     Title = "";
 }