Example #1
0
        public static void Initalize()
        {
            if (IsInitalized)
            {
                return;
            }

            Lines = new List <string>();
            Lines.Add("");
            BuildCommandLine();
            ConsoleWriteLine("Riddlersoft Testing Console Version 1.0");
            ConsoleWriteLine("");
            Kernal.SetCallback(CommandCompleate); //set the callback
            IsInitalized   = true;
            Kernal.OnError = OnError;
        }
Example #2
0
        private static void BuildCommandLine()
        {
            //attach server kernal
            Kernal.WriteLine = ConsoleWriteLine;
            Kernal.Write     = ConsoleWrite;
            Kernal.Clear     = ConsoleClear;
            Kernal.ReadLine  = ConsoleReadLine;

            _commandLines.Add("clrscr", (string command) => { ConsoleClear(""); CommandCompleate(null); });
            _commandLines.Add("server.", (string command) => { Kernal.Execute(command); });
            _commandLines.Add("genpass", (string command) =>
            {
                CommandCompleate(null);
            });
            _commandLines.Add("exit", (string command) => { CommandCompleate(null); });
        }