private void SetText(string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.label_uploading.InvokeRequired) { SetLabelProgress d = new SetLabelProgress(SetText); this.Invoke(d, new object[] { text }); } else { this.label_uploading.Text = text; } }
private void SetText(string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.label_uploading.InvokeRequired) { SetLabelProgress d = new SetLabelProgress(SetText); this.Invoke(d, new object[] { text }); } else { this.label_uploading.Text = text; //DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Uploading..." + text); } }