diff options
| author | lempamo <[email protected]> | 2017-03-31 17:47:56 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-03-31 17:47:56 -0400 |
| commit | 5ec8f66c1ad558a165cf621b405bee7cba48be0b (patch) | |
| tree | 055b21d8788a1946b60646daa5482126a4a23ec1 /TimeHACK.Main/Program.cs | |
| parent | 27419aa0dce06f9af5ee28f64aace365dcb7d816 (diff) | |
| parent | 6a489cc2dc2edf42a5509ded949357576731f658 (diff) | |
| download | histacom2-5ec8f66c1ad558a165cf621b405bee7cba48be0b.tar.gz histacom2-5ec8f66c1ad558a165cf621b405bee7cba48be0b.tar.bz2 histacom2-5ec8f66c1ad558a165cf621b405bee7cba48be0b.zip | |
Merge branch 'master' into master
Diffstat (limited to 'TimeHACK.Main/Program.cs')
| -rw-r--r-- | TimeHACK.Main/Program.cs | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/TimeHACK.Main/Program.cs b/TimeHACK.Main/Program.cs index 733ea02..5c3d46d 100644 --- a/TimeHACK.Main/Program.cs +++ b/TimeHACK.Main/Program.cs @@ -11,6 +11,7 @@ namespace TimeHACK { static class Program { + internal static bool nightly = true; internal static string gameID; /// <summary> @@ -20,16 +21,25 @@ namespace TimeHACK [STAThread] static void Main() { - try { - WebClient wc = new WebClient(); + if (nightly == true) + { + 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) + // 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 = "AppVeyor-" + j["buildNumber"].ToString(); + } + catch (WebException) + { + gameID = "AppVeyor"; + } + } + else { - gameID = "1.0.42"; + gameID = "TimeHACK 1.1"; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); |
