public static void ShowForm(string message = "") { var t = new Thread(() => { CurrentInstance = new WaitingForm(); if (!string.IsNullOrEmpty(message)) { CurrentInstance.lblMessage.Text = message; } CurrentInstance.ShowDialog(); }); t.IsBackground = true; t.SetApartmentState(ApartmentState.STA); t.Start(); }
public static void CloseWait() { WaitingForm.CloseForm(); }
public static void ShowWait(string message = "") { WaitingForm.ShowForm(message); }