blob: 1c66b458a0002e85734a4565bb99edc9f513d578 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
using System;
using System.Drawing.Text;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using System.Net;
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.
/// Run TitleScreen.cs at launch.
/// </summary>
[STAThread]
static void Main()
{
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 = "AppVeyor-" + j["buildNumber"].ToString();
}
catch (WebException)
{
gameID = "AppVeyor";
}
}
else
{
gameID = "TimeHACK 1.1";
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(title = new TitleScreen());
}
}
}
|