Skip to content

Commit

Permalink
补充更新时应用退出,修改更新程序图标。
Browse files Browse the repository at this point in the history
  • Loading branch information
NLTDEV2020 committed Dec 7, 2020
1 parent a314d94 commit fa65b14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file modified Update/96px.ico
Binary file not shown.
5 changes: 4 additions & 1 deletion Update/Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public Update()
{
if (DialogResult.Yes == MessageBox.Show("检查到新版本,是否更新?", "更新", MessageBoxButtons.YesNo))
{
try { foreach (Process p in Process.GetProcessesByName("devcpp")) p.Kill(); } catch { }

if (lasterVersion - currentVersion >= 2)
{
fullUpdate = true;
Expand All @@ -37,7 +39,8 @@ public Update()
else updater.Download(baseUrl + "Build/devcpp_i.zip", DownloadProgressCallback, DownloadCompletedCallback);
}
}
else Application.Exit();

Application.Exit();
}

private void Update_Load(object sender, EventArgs e) { }
Expand Down
Binary file modified update.exe
Binary file not shown.

0 comments on commit fa65b14

Please sign in to comment.