private void StartDownload(List <DownloadFileInfo> downloadList) { DownloadProgress dp = new DownloadProgress(downloadList); if (dp.ShowDialog() == DialogResult.OK) { //更新成功 config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, FILENAME)); if (bNeedRestart) { MessageBox.Show("程序需要重新启动才能应用更新,请点击确定重新启动程序。", "自动更新", MessageBoxButtons.OK, MessageBoxIcon.Information); Process.Start(Application.ExecutablePath); Environment.Exit(0); } } }
private void StartDownload(List<DownloadFileInfo> downloadList) { DownloadProgress dp = new DownloadProgress(downloadList); if (dp.ShowDialog() == DialogResult.OK) { //更新成功 config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, FILENAME)); if (bNeedRestart) { MessageBox.Show("程序需要重新启动才能应用更新,请点击确定重新启动程序。", "自动更新", MessageBoxButtons.OK, MessageBoxIcon.Information); Process.Start(Application.ExecutablePath); Environment.Exit(0); } } }