Skip to content

Commit 7082038

Browse files
committed
set avagui version to 2, ask user if they want to upgrade in v1
1 parent 88ac1a3 commit 7082038

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

AvaGui/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.5
1+
2.0.0

Gui/MainForm.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,16 @@ public MainForm()
143143
var latestVersion = GetLatestAppVersion();
144144
if (latestVersion > ApplicationVersion)
145145
{
146-
_ = MessageBox.Show($"Current Version: {ApplicationVersion}{Environment.NewLine}Latest version: {latestVersion}{Environment.NewLine}Taking you to the downloads page now ");
147-
_ = Process.Start(new ProcessStartInfo { FileName = GithubLatestReleaseDownloadPage, UseShellExecute = true });
148-
latestVersionText = $"newer version exists: {latestVersion}";
146+
if (latestVersion.Major == 1) // don't conflict versions with new avagui one
147+
{
148+
var result = MessageBox.Show($"Current Version: {ApplicationVersion}{Environment.NewLine}Latest version: {latestVersion}{Environment.NewLine}Would you like to download it now?", "Newer version available", MessageBoxButtons.YesNo);
149+
150+
if (result == DialogResult.Yes)
151+
{
152+
_ = Process.Start(new ProcessStartInfo { FileName = GithubLatestReleaseDownloadPage, UseShellExecute = true });
153+
}
154+
latestVersionText = $"newer version exists: {latestVersion}";
155+
}
149156
}
150157
#endregion
151158

0 commit comments

Comments
 (0)