void AppendTextToTextBox(string textToTextBox) { if (outData.InvokeRequired) { DelegateSetControlText d = new DelegateSetControlText(AppendTextToTextBox); outData.Invoke(d, new object[] { textToTextBox }); } else { outData.AppendText(textToTextBox); } }
void IncrementGeneralLabel(string textToLabel) { if (label3.InvokeRequired) { DelegateSetControlText d = new DelegateSetControlText(IncrementGeneralLabel); label3.Invoke(d, new object[] { textToLabel }); } else { label3.Text = textToLabel; } }