diff --git a/source/Cosmos/Cosmos.Shell.Console/Program.cs b/source/Cosmos/Cosmos.Shell.Console/Program.cs index 0398399d3..e72422c6e 100644 --- a/source/Cosmos/Cosmos.Shell.Console/Program.cs +++ b/source/Cosmos/Cosmos.Shell.Console/Program.cs @@ -21,9 +21,10 @@ namespace Cosmos.Shell.Console { System.Console.ForegroundColor = ConsoleColor.White; stages.Run(); System.Console.WriteLine("Success."); + System.Console.Write("Testing Prompter now:"); + new Prompter(); - System.Console.WriteLine("Hello World!!!"); - //while (true) ; + while (true) ; stages.Teardown(); diff --git a/source/Cosmos/Cosmos.Shell.Console/Prompter.cs b/source/Cosmos/Cosmos.Shell.Console/Prompter.cs index 0f40a8759..e89210ae6 100644 --- a/source/Cosmos/Cosmos.Shell.Console/Prompter.cs +++ b/source/Cosmos/Cosmos.Shell.Console/Prompter.cs @@ -14,65 +14,65 @@ namespace Cosmos.Shell.Console { } } - private List _commands; + //private List _commands; - private bool running = true; + //private bool running = true; public void Stop() { - running = false; + //running = false; } public override void Initialize() { - _commands = new List(); - _commands.Add(new Commands.ClsCommand()); - _commands.Add(new Commands.DirCommand()); - _commands.Add(new Commands.EchoCommand()); - //_commands.Add(new Commands.ExitCommand(Stop)); // TODO: Fix this. - _commands.Add(new Commands.HelpCommand(_commands)); - _commands.Add(new Commands.TypeCommand()); - _commands.Add(new Commands.MatthijsCommand()); + //_commands = new List(); + //_commands.Add(new Commands.ClsCommand()); + //_commands.Add(new Commands.DirCommand()); + //_commands.Add(new Commands.EchoCommand()); + ////_commands.Add(new Commands.ExitCommand(Stop)); // TODO: Fix this. + //_commands.Add(new Commands.HelpCommand(_commands)); + //_commands.Add(new Commands.TypeCommand()); + //_commands.Add(new Commands.MatthijsCommand()); - while (running) - { - System.Console.Write("/> "); - string line = System.Console.ReadLine(); - int index = line.IndexOf(' '); - string command; - string param; - if (index == -1) - { - command = line; - param = ""; - } - else - { - command = line.Substring(0, index); - param = line.Substring(index + 1); - } + //while (running) + //{ + // System.Console.Write("/> "); + // string line = System.Console.ReadLine(); + // int index = line.IndexOf(' '); + // string command; + // string param; + // if (index == -1) + // { + // command = line; + // param = ""; + // } + // else + // { + // command = line.Substring(0, index); + // param = line.Substring(index + 1); + // } - bool found = false; - for (int i = 0; i < _commands.Count; i++) - { - if (_commands[i].Name.CompareTo(command) == 0) - { - found = true; - _commands[i].Execute(param); - break; - } - } + // bool found = false; + // for (int i = 0; i < _commands.Count; i++) + // { + // if (_commands[i].Name.CompareTo(command) == 0) + // { + // found = true; + // _commands[i].Execute(param); + // break; + // } + // } - if (!found) - { - System.Console.ForegroundColor = ConsoleColor.Red; - System.Console.Write("The command "); - System.Console.Write(command); - System.Console.WriteLine(" is not supported. Please type help for more information."); - System.Console.ForegroundColor = ConsoleColor.White; - System.Console.WriteLine(); - } - } + // if (!found) + // { + // System.Console.ForegroundColor = ConsoleColor.Red; + // System.Console.Write("The command "); + // System.Console.Write(command); + // System.Console.WriteLine(" is not supported. Please type help for more information."); + // System.Console.ForegroundColor = ConsoleColor.White; + // System.Console.WriteLine(); + // } + //} } public override void Teardown()