Esempio n. 1
0
 private void PrintToOutput(string text)
 {
     if (txtOutput.InvokeRequired)
     {
         txtOutput.Invoke(new updateDelegate(PrintToOutput), text);
     }
     else
     {
         System.Console.WriteLine(text);
         txtOutput.AppendText(Environment.NewLine);
         txtOutput.AppendText($"{DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}: {text}");
         SyntaxHighlight.Apply(txtOutput, outputLastLength);
         outputLastLength = txtOutput.Text.Length;
     }
 }
Esempio n. 2
0
 private void txtOutput_TextChanged(object sender, EventArgs e)
 {
     SyntaxHighlight.Apply(txtOutput);
 }