예제 #1
0
 /// <summary>
 /// Reads a character from the console component
 /// </summary>
 /// <returns>The character read</returns>
 public char Read()
 {
     Reading = true;
     KeyMan.Focus(this);
     while (Reading)
     {
         ;             //Wait for user to enter input
     }
     KeyMan.Unfocus();
     return((char)In.Read());
 }
예제 #2
0
        /// <summary>
        /// Reads a segment/string from input
        /// </summary>
        /// <returns>The read string</returns>
        public string ReadLine()
        {
            Reading = true;
            KeyMan.Focus(this);
            while (Reading)
            {
                ;             //Wait for user to enter input
            }
            KeyMan.Unfocus();

            return(In.ReadLine());
        }