private void CloseWaitDialog() { if (_waitDialog != null) { _waitDialog.Close(); _waitDialog = null; } }
protected void ShowWaitDialog(string message) { //if (InvokeRequired) //{ // Invoke(new ShowWaitDialogDG(ShowWaitDialog), message); // return; //} MainThread.Post((d) => { this.Enabled = false; CloseWaitDialog(); _waitDialog = new GenericWaitDialog(); _waitDialog.ShowDialog(message); }); }
protected void CloseWaitDialog() { //if (InvokeRequired) //{ // Invoke(new MethodInvoker(CloseWaitDialog)); // return; //} MainThread.Post((d) => { this.Enabled = true; if (_waitDialog != null) { _waitDialog.Close(); _waitDialog = null; } }); }
private void ShowWaitDialog(string message) { CloseWaitDialog(); _waitDialog = new GenericWaitDialog(); _waitDialog.ShowDialog(message); }