private void DelegateText(Control control, string text) { if (control.InvokeRequired) { DelegateTextCallback d = DelegateText; Invoke(d, control, text); } else { control.Text = text; } }
/// <summary> /// </summary> /// <param name="control"></param> /// <param name="text"></param> public static void DelegateText(Control control, string text) { if (control.InvokeRequired) { DelegateTextCallback d = DelegateText; _frm3DprinterTool.Invoke(d, control, text); } else { control.Text = text; } }