diff options
| author | lempamo <[email protected]> | 2017-03-28 14:34:48 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-03-28 14:34:48 -0400 |
| commit | e053882e86b50497ad851ec86f8795a7a7c4c607 (patch) | |
| tree | 4818a501f3351aced6677490360e8031e436a8d9 /TimeHACK.Main/Program.cs | |
| parent | 023db4c64f6197e5de6b2c56c3b5b46cc9824ea3 (diff) | |
| download | histacom2-e053882e86b50497ad851ec86f8795a7a7c4c607.tar.gz histacom2-e053882e86b50497ad851ec86f8795a7a7c4c607.tar.bz2 histacom2-e053882e86b50497ad851ec86f8795a7a7c4c607.zip | |
version number that updates
Diffstat (limited to 'TimeHACK.Main/Program.cs')
| -rw-r--r-- | TimeHACK.Main/Program.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/TimeHACK.Main/Program.cs b/TimeHACK.Main/Program.cs index 96aedaa..733ea02 100644 --- a/TimeHACK.Main/Program.cs +++ b/TimeHACK.Main/Program.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; +using Newtonsoft.Json.Linq; +using System.Net; namespace TimeHACK { @@ -18,8 +20,17 @@ namespace TimeHACK [STAThread] static void Main() { - // Set the GameID - gameID = "1.0.44"; + try { + WebClient wc = new WebClient(); + + // Set the GameID + string json = wc.DownloadString("http://ci.appveyor.com/api/projects/timehack/timehack"); + JObject j = JObject.Parse(JObject.Parse(json)["build"].ToString()); + gameID = "1.0." + j["buildNumber"].ToString(); + } catch (WebException) + { + gameID = "1.0.42"; + } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TitleScreen()); |
