diff --git a/JexusManager.sln b/JexusManager.sln index 94f4b148..48b98fdc 100644 --- a/JexusManager.sln +++ b/JexusManager.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.0 +VisualStudioVersion = 15.0.26430.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JexusManager", "JexusManager\JexusManager.csproj", "{5203A38D-6A1D-4785-8E83-54081AD2ADAA}" EndProject diff --git a/JexusManager/Dialogs/UpdateDialog.cs b/JexusManager/Dialogs/UpdateDialog.cs index e10499d2..be1852a3 100644 --- a/JexusManager/Dialogs/UpdateDialog.cs +++ b/JexusManager/Dialogs/UpdateDialog.cs @@ -8,7 +8,6 @@ namespace JexusManager.Dialogs { using System; using System.Diagnostics; - using System.Net; using System.Reflection; using System.Windows.Forms; @@ -22,13 +21,20 @@ public UpdateDialog() private async void UpdateDialog_Load(object sender, EventArgs e) { txtStep.Text = "Checking update..."; - string version; + string version = null; try { var client = new GitHubClient(new ProductHeaderValue("JexusManager")); var releases = await client.Repository.Release.GetAll("jexuswebserver", "JexusManager"); + if (releases.Count == 0) + { + MessageBox.Show("No update is found", Text, MessageBoxButtons.OK, MessageBoxIcon.Information); + Close(); + return; + } + var recent = releases[0]; - version = recent.Name; + version = recent.TagName.Substring(1); } catch (Exception) { @@ -53,14 +59,14 @@ private async void UpdateDialog_Load(object sender, EventArgs e) return; } - var result = MessageBox.Show(string.Format("An update ({0}) is available. Do you want to download it now?", latest), Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question); + var result = MessageBox.Show($"An update ({latest}) is available. Do you want to download it now?", Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result != DialogResult.Yes) { Close(); return; } - Process.Start("https://jexus.codeplex.com/releases"); + Process.Start("https://github.com/jexuswebserver/JexusManager/releases"); Close(); } } diff --git a/JexusManager/JexusManager.csproj b/JexusManager/JexusManager.csproj index bafb4307..4abe99d7 100644 --- a/JexusManager/JexusManager.csproj +++ b/JexusManager/JexusManager.csproj @@ -73,6 +73,10 @@ ..\lib\Mono.Security.dll + + False + ..\lib\Octokit.dll + @@ -88,9 +92,6 @@ - - Properties\SharedAssemblyInfo.cs - UserControl @@ -612,9 +613,6 @@ 2.0.13 - - 0.24.0 - 1.0.0 diff --git a/JexusManager/Properties/AssemblyInfo.cs b/JexusManager/Properties/AssemblyInfo.cs index 6363ce33..db19315f 100644 --- a/JexusManager/Properties/AssemblyInfo.cs +++ b/JexusManager/Properties/AssemblyInfo.cs @@ -31,3 +31,6 @@ + "a564e86c4a4cddc9597619a31c060846ebb2e99511a0323ff82b1ebd95d6a4912502945f0e769f" + "190a69a439dbfb969ebad72a6f7e2e047907da4a7b9c08c6e98d5f1be8b8cafaf3eb978914059a" + "245d4bc1")] +[assembly: AssemblyVersion("2.1.0.0")] +[assembly: AssemblyFileVersion("2.1.0.0")] + diff --git a/lib/Octokit.dll b/lib/Octokit.dll new file mode 100644 index 00000000..e08d700a Binary files /dev/null and b/lib/Octokit.dll differ