Compare commits
4 Commits
1.4.1
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
| 1366481931 | |||
| 56165cae46 | |||
| 86e6be2bd3 | |||
| 8245955e9c |
@@ -332,15 +332,15 @@
|
||||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:Car Manager 3"
|
||||
"ProductCode" = "8:{8FDFF7ED-D464-4F87-BA8F-BDC1000520E4}"
|
||||
"PackageCode" = "8:{83DA7553-805F-4A70-921B-9A6FB0787780}"
|
||||
"ProductCode" = "8:{24769DBA-B806-4E47-9F4C-17BC8AD0528E}"
|
||||
"PackageCode" = "8:{741BAAEC-3EE7-46C4-94AB-575C677186BB}"
|
||||
"UpgradeCode" = "8:{6FF57925-465E-4DB9-85DA-CE933191A3DD}"
|
||||
"AspNetVersion" = "8:2.0.50727.0"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:1.4.0"
|
||||
"ProductVersion" = "8:1.4.1"
|
||||
"Manufacturer" = "8:Jaro Digital"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:"
|
||||
|
||||
@@ -19,6 +19,7 @@ Global
|
||||
{93CA258B-A645-41A8-A24F-59036ABC173F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{47ED51EB-1DD0-B8F0-88C8-92C6E3E06030}.Debug|Any CPU.ActiveCfg = Debug
|
||||
{47ED51EB-1DD0-B8F0-88C8-92C6E3E06030}.Release|Any CPU.ActiveCfg = Release
|
||||
{47ED51EB-1DD0-B8F0-88C8-92C6E3E06030}.Release|Any CPU.Build.0 = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -32,15 +32,6 @@ namespace CarManagerV3.Forms
|
||||
|
||||
private void btnInstallUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
var msgbox = new PleaseWait();
|
||||
msgbox.Show();
|
||||
Application.DoEvents();
|
||||
StateManager.UpdateCar(car);
|
||||
Image fooimg = ImageManager.GetImage(car);
|
||||
msgbox.Close();
|
||||
this.Close();
|
||||
*/
|
||||
PleaseWait loadForm = new PleaseWait("Downloading the newest version...");
|
||||
try
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -91,14 +92,19 @@ namespace CarManagerV3.Manager
|
||||
{
|
||||
using (var client = new System.Net.Http.HttpClient())
|
||||
{
|
||||
UrlEncoder encoder = System.Text.Encodings.Web.UrlEncoder.Default;
|
||||
var response = client.GetAsync(PreReleaseEndpoint).Result;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
|
||||
var content = response.Content.ReadAsStringAsync().Result;
|
||||
dynamic releases = Newtonsoft.Json.JsonConvert.DeserializeObject(content);
|
||||
//System.Diagnostics.Debug.WriteLine("Fetched pre-release versions, count: " + releases.Count);
|
||||
if (releases.Count > 0)
|
||||
{
|
||||
var preReleaseVersion = releases[0].tag_name;
|
||||
var preReleaseVersion = releases[0].tag_name.ToString();
|
||||
//System.Diagnostics.Debug.WriteLine("Latest unstable version: " + preReleaseVersion);
|
||||
|
||||
// Compare versions and return the newer one
|
||||
if (IsNewerVersion(preReleaseVersion, latestVersion))
|
||||
{
|
||||
@@ -107,6 +113,10 @@ namespace CarManagerV3.Manager
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Failed to fetch pre-release versions, status code: " + response.StatusCode + " at: " + PreReleaseEndpoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
SetCache(latestVersion, includePreRelease);
|
||||
|
||||
Reference in New Issue
Block a user