private ExitCode StartDownload(List <DownloadFileInfo> downloadList) { DownloadProgress dp = new DownloadProgress(downloadList); if (dp.ShowDialog() == DialogResult.OK) { // if (DialogResult.Cancel == dp.ShowDialog()) { return(dp.ExitCode); } //Update successfully _config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constant.Filename)); // if (_bNeedRestart) { //Delete the temp folder Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constant.Tempfoldername), true); MessageBox.Show(Constant.Applytheupdate, Constant.Messagetitle, MessageBoxButtons.OK, MessageBoxIcon.Information); CommonUnitity.ExitApp(ExitCode.SuccessUpdate); } return(ExitCode.SuccessUpdate); } return(dp.ExitCode); }
private void ShowErrorAndExitApp() { MessageBox.Show(Constant.Notnetwork, Constant.Messagetitle, MessageBoxButtons.OK, MessageBoxIcon.Information); CommonUnitity.ExitApp(ExitCode.UpdateError); ExitCode = ExitCode.UpdateError; }