Example #1
0
        void _WorkThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            System.Threading.Thread.Sleep(100);

            _WaitDialog.Close();
            _WaitDialog = null;
        }
Example #2
0
        /// <summary>
        /// InvokeMethodWithWaitCursor
        /// </summary>
        /// <param name="exectute">需要被执行的操作</param>
        /// <param name="waitingMessage">等待操作过程中显示在客户端的消息</param>
        public InvokeMethodWithWaitCursor(Action exectute, string waitingMessage)
        {
            _Exectute = exectute;

            _WaitDialog = new WaitCursorDialog(waitingMessage);

            iniAsynWorkThread();
        }
Example #3
0
        private void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (disposing)
                {
                    try
                    {
                        if (_WaitDialog != null)
                        {
                            _WaitDialog.Close();
                        }

                        _WaitDialog = null;
                        _WorkThread.Dispose();
                    }
                    catch { }
                }
                disposed = true;
            }
        }