-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
37 lines (30 loc) · 1.1 KB
/
Program.cs
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
using System;
using System.Net;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using PokeD.Core.Extensions;
namespace PokeD.SCON.Desktop
{
public static class Program
{
static Program()
{
PacketExtensions.Init();
}
public static void Main(params string[] args)
{
if (Type.GetType("Mono.Runtime") != null) // -- Running on Mono
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
using (var game = new EmptyKeysUI(PlatformCode))
game.Run();
}
private static void PlatformCode(Game client)
{
client.Window.ClientSizeChanged += ((EmptyKeysUI) client).OnResize;
client.IsMouseVisible = true;
client.Window.Position = new Point(0, 0);
client.Window.AllowUserResizing = true;
((EmptyKeysUI) client).Resize(new Point(GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height));
}
}
}