Exemple #1
0
 //显示错误信息
 private void ShowErrorAndRestartApplication()
 {
     Msg.DisplayMsg(ConstFile.NOTNETWORK, ConstFile.MESSAGETITLE, 9000);
     // MessageBox.Show(ConstFile.NOTNETWORK, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information);
     //MessageBox.Show(ConstFile.NOTNETWORK,ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information);
     CommonUnitity.RestartApplication();
 }
Exemple #2
0
        private void StartDownload(List <DownloadFileInfo> downloadList)
        {
            DownloadProgress dp = new DownloadProgress(downloadList);

            if (dp.ShowDialog() == DialogResult.OK)
            {
                //
                if (DialogResult.Cancel == dp.ShowDialog())
                {
                    return;
                }
                //更新完成

                config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.FILENAME));

                if (bNeedRestart)
                {
                    //需要重启更新
                    Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.TEMPFOLDERNAME), true);
                    Msg.DisplayMsg(ConstFile.APPLYTHEUPDATE, ConstFile.MESSAGETITLE, 5000);
                    CommonUnitity.RestartApplication();
                }
            }
        }