Esempio n. 1
0
        /// <summary>
        /// Writes text to the console.
        /// </summary>
        public void Write(string text, ScriptingStyle style)
        {
            textEditor.Write(text);
            if (style == ScriptingStyle.Prompt)
            {
                firstPromptDisplayed = true;
                promptLength         = text.Length;

                WriteFirstLineOfSentText();

                textEditor.MakeCurrentContentReadOnly();
            }
        }
 void ThreadSafeTextEditorWrite(string text)
 {
     if (dispatcher.CheckAccess())
     {
         textEditor.Write(text);
     }
     else
     {
         Action <string> action = ThreadSafeTextEditorWrite;
         dispatcher.Invoke(action, text);
     }
 }