Beispiel #1
0
        public void WriteLine(string text)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                RichTextBox_Console.AppendText("[Console]: " + text);
            }), DispatcherPriority.Background);
            text = text + "\r\n";
            byte[] temp = Encoding.UTF8.GetBytes(text);

            main.filesystem.AddInfoToFileAsync(main.filesystem.FSConfig.temp_path + @"\log.txt", temp, false);
        }
Beispiel #2
0
 public void AddTextToConsole(string str)
 {
     App.Current.Dispatcher.Invoke(delegate
     {
         RemoveInputBlock();
         RichTextBox_Console.Document.Blocks.Add(new Paragraph());
         RichTextBox_Console.AppendText(str);
         AddInputBlock();
         RichTextBox_Console.CaretPosition = RichTextBox_Console.CaretPosition.DocumentEnd;
     });
 }