public void WriteText(UIMessage uim) { if (this.screenTextBox.InvokeRequired) { WriteTextCallback d = new WriteTextCallback(WriteText); this.Invoke(d, new object[] { uim }); } else { if (screenTextBox.Lines.Length == 500) screenTextBox.Clear(); screenTextBox.AppendText("[" + uim.To + "]" + " " + "<" + uim.From + ">" + " " + uim.Text + Environment.NewLine); screenTextBox.ScrollToCaret(); } }
public void WriteUI(UIMessage uim) { _mainForm.WriteText(uim); }