protected override void Initialize()
{
_log.Debug("Initialize();");
_log.Info("Sharpcraft is initializing!");
base.Initialize();
/* /!\ Steam hardcore loading action /!\ */
_log.Info("Loading Steam components...");
if (SteamManager.Init())
{
//SteamManager.FriendList.LoadFriends(); // Should load automatically now
//Application.EnableVisualStyles();
_log.Info("Creating Steam GUI.");
// TODO: Find a way to set the start location of SteamGUI to be next to Game Window.
var steamGUI = new SteamGUI();
if (!steamGUI.Visible)
steamGUI.Show();
_log.Info("Steam components loaded!");
}
else
{
_log.Info("Steam not installed or not running, Steam functionality will NOT be available.");
}
// /!\ WARNING /!\
// Ugly debug code ahead!
_log.Debug("Starting debug connection...");
_server = new Server("F16Gaming Test", "localhost", 25565, "The test server", 0, 0, 0, true);
Client = new Client(_server, new Player(0, "Sharpcraft"));
Client.Connect();
_log.Debug("Reached end of debug connection!");
Exiting += (s, e) => Client.Exit();
}