Пример #1
0
        private void StartDownload(List <DownloadFileInfo> downloadList)
        {
            DownloadProgress dp = new DownloadProgress(downloadList, config);

            if (dp.ShowDialog() == DialogResult.OK)
            {
                //Update successfully
                config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.FILENAME));
                //Delete the temp folder
                Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.TEMPFOLDERNAME), true);

                if (bNeedRestart)
                {
                    MessageBox.Show(ConstFile.APPLYTHEUPDATE, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    CommonUnitity.RestartApplication();
                }
            }
        }
Пример #2
0
 private void ShowErrorAndRestartApplication(string msg)
 {
     MessageBox.Show(msg, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information);
     CommonUnitity.RestartApplication();
 }