diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-03-28 20:02:41 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-03-28 20:02:41 +0100 |
| commit | 36f06ca57b06a2b049eeb8260290b0aade62a154 (patch) | |
| tree | d0cdbdd6a516a671c0a3ea3661e89495bdf30241 /TimeHACK.Main/Program.cs | |
| parent | fd1b6907708cb9464b971573cd007dcbb3f47092 (diff) | |
| parent | cc8bd453b64096f3c0da1b2335701e0ef61191b5 (diff) | |
| download | histacom2-36f06ca57b06a2b049eeb8260290b0aade62a154.tar.gz histacom2-36f06ca57b06a2b049eeb8260290b0aade62a154.tar.bz2 histacom2-36f06ca57b06a2b049eeb8260290b0aade62a154.zip | |
Merge pull request #14 from lempamo/master
web chat is getting started
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()); |
