public void Dispose() { try { _DownloadWaitDialog.Dispose(); _DownloadWaitDialog = null; _WorkThread.Dispose(); _WorkThread = null; } catch { } }
/// <summary> /// 判断并显示下载处理窗口。 /// </summary> /// <returns></returns> public bool DownloadVersionFileDialog() { bool b = CheckExistsNewVersion(out _CurrentNewVersionNumber); if (!b) { return(false); } //初始化下栽文件 iniForDownloadFiles(_CurrentNewVersionNumber); _WorkThread = new MB.Util.AsynWorkThread(); _DownloadWaitDialog = new FileDownloadWaitDialog(this, _AutoUpdate, _VersionDownloadFiles); _DownloadWaitDialog.ClickCanceled += new EventHandler(_DownloadWaitDialog_ClickCanceled); DialogResult re = _DownloadWaitDialog.ShowDialog(); return(!_WaitProcessState.Cancel); }