void _WorkThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { System.Threading.Thread.Sleep(100); _WaitDialog.Close(); _WaitDialog = null; }
/// <summary> /// InvokeMethodWithWaitCursor /// </summary> /// <param name="exectute">需要被执行的操作</param> /// <param name="waitingMessage">等待操作过程中显示在客户端的消息</param> public InvokeMethodWithWaitCursor(Action exectute, string waitingMessage) { _Exectute = exectute; _WaitDialog = new WaitCursorDialog(waitingMessage); iniAsynWorkThread(); }
private void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { try { if (_WaitDialog != null) { _WaitDialog.Close(); } _WaitDialog = null; _WorkThread.Dispose(); } catch { } } disposed = true; } }