private void StartDownload(List <DownloadFileInfo> downloadList) { DownloadProgress dp = new DownloadProgress(downloadList); if (dp.ShowDialog() == DialogResult.OK) { // if (DialogResult.Cancel == dp.ShowDialog()) { return; } //Update successfully config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.FILENAME)); if (bNeedRestart) { //Delete the temp folder Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.TEMPFOLDERNAME), true); if (config.Silence != true) { MessageBox.Show(ConstFile.APPLYTHEUPDATE, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information); } CommonUnitity.RestartApplication(); } } }
private void ShowErrorAndRestartApplication() { MessageBox.Show(ConstFile.NOTNETWORK, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information); CommonUnitity.RestartApplication(); }