public void AppendToMainTitleBarText(ref string Text) { try { if (this.InvokeRequired) { AvoidCrossThreadDelegateRichTextBox tempDelegate = new AvoidCrossThreadDelegateRichTextBox(AppendToMainTitleBarText); this.Invoke(tempDelegate, Text); } else { this.Text = Text; } } catch (System.Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK); } }
public void AppendToMainTitleBarText(ref string Text) { try { if (this.InvokeRequired) { var tempDelegate = new AvoidCrossThreadDelegateRichTextBox(AppendToMainTitleBarText); this.Invoke(tempDelegate, Text); } else { this.Text = Text; } } catch (System.Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK); } }