Skip to content

Commit

Permalink
Fixed Octokit.dll reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Jul 17, 2017
1 parent 8a16ed5 commit 5c5c51b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion JexusManager.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 11 additions & 5 deletions JexusManager/Dialogs/UpdateDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace JexusManager.Dialogs
{
using System;
using System.Diagnostics;
using System.Net;
using System.Reflection;
using System.Windows.Forms;

Expand All @@ -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)
{
Expand All @@ -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();
}
}
Expand Down
10 changes: 4 additions & 6 deletions JexusManager/JexusManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
<Reference Include="Mono.Security">
<HintPath>..\lib\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="Octokit, Version=0.24.0.0, Culture=neutral, PublicKeyToken=4ea77d40eabcaf2f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\Octokit.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
Expand All @@ -88,9 +92,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\lib\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Features\Main\ApplicationFeature.cs" />
<Compile Include="Features\Main\ApplicationPage.cs">
<SubType>UserControl</SubType>
Expand Down Expand Up @@ -612,9 +613,6 @@
<PackageReference Include="ILRepack">
<Version>2.0.13</Version>
</PackageReference>
<PackageReference Include="Octokit">
<Version>0.24.0</Version>
</PackageReference>
<PackageReference Include="Ookii.Dialogs.WindowsForms">
<Version>1.0.0</Version>
</PackageReference>
Expand Down
3 changes: 3 additions & 0 deletions JexusManager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
+ "a564e86c4a4cddc9597619a31c060846ebb2e99511a0323ff82b1ebd95d6a4912502945f0e769f"
+ "190a69a439dbfb969ebad72a6f7e2e047907da4a7b9c08c6e98d5f1be8b8cafaf3eb978914059a"
+ "245d4bc1")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]

Binary file added lib/Octokit.dll
Binary file not shown.

0 comments on commit 5c5c51b

Please sign in to comment.