aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/Program.cs
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-04-22 13:41:33 -0600
committerAShifter <[email protected]>2017-04-22 13:41:33 -0600
commit51177cd4c24b9b107726bdbae914d49f6b5fa7b5 (patch)
tree08d585cb8e2b0241aaede964a38973af42a1c470 /TimeHACK.Main/Program.cs
parent5773e8ac9aeac2d395a700eac26d86db90c60c13 (diff)
parente6474bbf221d26d227e42174c4d1ab939987be2b (diff)
downloadhistacom2-51177cd4c24b9b107726bdbae914d49f6b5fa7b5.tar.gz
histacom2-51177cd4c24b9b107726bdbae914d49f6b5fa7b5.tar.bz2
histacom2-51177cd4c24b9b107726bdbae914d49f6b5fa7b5.zip
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
Diffstat (limited to 'TimeHACK.Main/Program.cs')
-rw-r--r--TimeHACK.Main/Program.cs29
1 files changed, 20 insertions, 9 deletions
diff --git a/TimeHACK.Main/Program.cs b/TimeHACK.Main/Program.cs
index 733ea02..1c66b45 100644
--- a/TimeHACK.Main/Program.cs
+++ b/TimeHACK.Main/Program.cs
@@ -11,7 +11,9 @@ namespace TimeHACK
{
static class Program
{
+ internal static bool nightly = true;
internal static string gameID;
+ internal static TitleScreen title = null;
/// <summary>
/// The main entry point for the application.
@@ -20,20 +22,29 @@ 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);
- Application.Run(new TitleScreen());
+ Application.Run(title = new TitleScreen());
}
}
}