private void SetConsoleText(string text) { if (this.consoleTB.InvokeRequired) { SetConsoleTextCallback d = new SetConsoleTextCallback(SetConsoleText); this.Invoke(d, new object[] { text }); } else { if (consoleTB.Lines.Count() == 200) { consoleTB.Text = string.Empty; } string previous = consoleTB.Text; this.consoleTB.Text = text + Environment.NewLine + previous + Environment.NewLine; } }
private void SetConsoleText(string text) { if (this.consoleTB.InvokeRequired) { SetConsoleTextCallback d = new SetConsoleTextCallback(SetConsoleText); this.Invoke(d, new object[] { text }); } else { if (consoleTB.Lines.Count() == 200) consoleTB.Text = string.Empty; string previous = consoleTB.Text; this.consoleTB.Text = text + Environment.NewLine + previous + Environment.NewLine; } }