Пример #1
0
 public ConsoleManager(Blackboard blk, Kernel kernel, ConsoleLogWriter log)
 {
     this.kernel = kernel;
     this.blackboard = blk;
     this.log = log;
     this.currentLine = String.Empty;
     this.tabSw = new Stopwatch();
     this.firstTab = false;
     this.history = new CommandHistoryManager();
     this.completionTree = new CompletionTree();
     this.kernel.ConsoleManager = this;
     this.kernel.FillCompletionTree(this.completionTree);
 }
Пример #2
0
        /// <summary>
        /// Keep running the application
        /// </summary>
        private void Run()
        {
            if (!LoadBlackboard())
                return;
            this.log.WriteLine("Starting Blackboard");
            this.blackboard.Start();
            Program.running = true;

            this.kernel = new Kernel(blackboard);
            this.consoleManager = new ConsoleManager(blackboard, kernel, cLog);
            this.consoleManager.DisableLog();
            kernel.ListModules();
            kernel.Execute("help");
            consoleManager.WritePrompt();
            while (this.blackboard.IsRunning)
            {
                consoleManager.Poll();
            }
            Console.WriteLine("Good bye!");
            Console.WriteLine();
        }