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; } }
private void txtOutput_TextChanged(object sender, EventArgs e) { SyntaxHighlight.Apply(txtOutput); }