Exemplo n.º 1
0
        /// <summary>
        /// 系统升级提示
        /// </summary>
        /// <param name="project"></param>
        public void UpgradeNotify(UpgradeProject project)
        {
            string upgradeUrl = UpgradeService.GetUpgradeUrl(project.Product, project.Version);

            if (XtraMessageBox.Show(String.Format("服务器发布了 \'{0}\" 的新版本 {1},您要立即升级到新版本吗?", project.Product, project.Version),
                                    "升级提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                UpgradeProcess up = new UpgradeProcess(project, upgradeUrl);
                if (up.ShowDialog() == DialogResult.OK)
                {
                    SerializeUpgrade(project);
                    ReStartApplication(project);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 系统升级提示
 /// </summary>
 /// <param name="project"></param>
 public void UpgradeNotify(UpgradeProject project)
 {
     string upgradeUrl = UpgradeService.GetUpgradeUrl(project.Product, project.Version);
     if (XtraMessageBox.Show(String.Format("服务器发布了 \'{0}\" 的新版本 {1},您要立即升级到新版本吗?", project.Product, project.Version),
         "升级提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         UpgradeProcess up = new UpgradeProcess(project, upgradeUrl);
         if (up.ShowDialog() == DialogResult.OK)
         {
             SerializeUpgrade(project);
             ReStartApplication(project);
         }
     }
 }