private void updateUITextLine(RichTextBox control, string text, string end, Color color) { control.Invoke(new Action(() => { control.SelectionColor = color; control.AppendText(text + end); control.ScrollToCaret(); })); }