Esempio n. 1
0
        /// <summary>
        /// Processes input from the console and invokes the invoker until 'exit' is typed.
        /// </summary>
        public void ProcessInput()
        {
            string line = string.Empty;

            outputter.PrintLine("Zühlke Agile Course [Version 19.1.2010]");
            outputter.PrintLine("(C) Copyright 2006-2010 Rainer Grau and Daniel Tobler.");

            while (line.Trim().Equals("exit", StringComparison.OrdinalIgnoreCase) == false)
            {
                int readChar = 0;
                var input    = new StringBuilder();

                outputter.NewLine();
                outputter.Print(drive.Prompt);
                try
                {
                    while (readChar != '\n')
                    {
                        readChar = System.Console.Read();
                        input.Append((char)readChar);
                    }

                    line = input.ToString();
                }
                catch (IOException)
                {
                    // do nothing by intention
                }

                invoker.ExecuteCommand(line, outputter);
            }

            outputter.PrintLine("\nGoodbye!");
            drive.Save();
        }
Esempio n. 2
0
        /// <summary>
        /// Processes input from the console and invokes the invoker until 'exit' is typed.
        /// </summary>
        public void ProcessInput()
        {
            string line = string.Empty;

            outputter.PrintLine("DOSBox, Scrum.org, Professional Scrum Developer Training");
            outputter.PrintLine("Copyright (c) Rainer Grau and Daniel Tobler. All rights reserved.");

            while (line.Trim().Equals("exit", StringComparison.OrdinalIgnoreCase) == false)
            {
                int readChar = 0;
                var input    = new StringBuilder();

                outputter.NewLine();
                outputter.Print(drive.Prompt);
                try
                {
                    while (readChar != '\n')
                    {
                        readChar = System.Console.Read();
                        input.Append((char)readChar);
                    }

                    line = input.ToString();
                }
                catch (IOException)
                {
                    // do nothing by intention
                }

                outputter.ResetStatistics();
                invoker.ExecuteCommand(line, outputter);
            }

            outputter.PrintLine("\nGoodbye!");
            drive.Save();
        }