/// <summary>
 /// Writes text to the console.
 /// </summary>
 public void Write(string text, Style style)
 {
     textEditor.Write(text);
     if (style == Style.Prompt)
     {
         promptLength = text.Length;
         if (!consoleInitialized)
         {
             consoleInitialized = true;
             ConsoleInitialized?.Invoke(this, EventArgs.Empty);
         }
     }
 }
Example #2
0
 // This is the type VS 2003 and 2005 use for flagging a whole line copy
 #endregion CommandHandling
 /// <summary>
 /// Writes text to the console.
 /// </summary>
 public void Write(string text, Style style)
 {
     _textEditor.Write(text);
     if (style == Style.Prompt)
     {
         _promptLength = text.Length;
         if (!_consoleInitialized)
         {
             _consoleInitialized = true;
             if (ConsoleInitialized != null)
             {
                 ConsoleInitialized(this, EventArgs.Empty);
             }
         }
     }
 }
Example #3
0
 /// <summary>
 /// Writes text followed by a newline to the console.
 /// </summary>
 public void WriteLine(string text, Style style)
 {
     Write(text + Environment.NewLine, style);
 }
Example #4
0
 /// <summary>
 /// Writes text to the console.
 /// </summary>
 public void Write(string text, Style style)
 {
     textEditor.Write(text);
     if (style == Style.Prompt)
     {
         promptLength = text.Length;
         if (!consoleInitialized)
         {
             consoleInitialized = true;
             if (ConsoleInitialized != null) ConsoleInitialized(this, EventArgs.Empty);
         }
     }
 }
Example #5
0
 /// <summary>
 /// Writes text followed by a newline to the console.
 /// </summary>
 public void WriteLine(string text, Style style)
 {
     Write(text + Environment.NewLine, style);
 }