static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); InfoGather.DatabasePassword = ConfigurationSettings.AppSettings["DatabasePassword"]; InfoGather.DatabaseSchema = ConfigurationSettings.AppSettings["DatabaseSchema"]; InfoGather.DatabaseServer = ConfigurationSettings.AppSettings["DatabaseServer"]; InfoGather.DatabasePort = ConfigurationSettings.AppSettings["DatabasePort"]; InfoGather.DatabaseUser = ConfigurationSettings.AppSettings["DatabaseUser"]; InfoGather.BuildConnectionString(); Players.ListByPlayerId = new Dictionary <uint, Player>(); Players.ListByKey = new Dictionary <string, Player>(); Characters.List = new Dictionary <uint, Character>(); Logs.AdvancementAlerts = new Dictionary <uint, Log>(); Logs.DeathAlerts = new Dictionary <uint, Log>(); Logs.EnforcementAlerts = new Dictionary <uint, Log>(); Logs.RecentLogins = new Dictionary <uint, Log>(); Servers.List = new Dictionary <uint, Server>(); if (InfoGather.GetPlayers()) { InfoGather.GetCharacters(); InfoGather.CountBankValue(); InfoGather.CountpChestValue(); InfoGather.GetAlerts(); InfoGather.GetLogins(); InfoGather.IdentifyLogins(); InfoGather.GetDMTime(); InfoGather.currentLoader.Close(); InfoGather.currentLoader.Dispose(); if (ServerFocus >= 0) { foreach (Server srv in Servers.List.Values) { if (srv.ServerId == Math.Abs(ServerFocus)) { Application.Run(new ServerView(srv)); } } } else { foreach (Server srv in Servers.List.Values) { new ServerView(srv).Show(); } new ServerView(null).Show(); Application.Run(new PrimaryDisplay()); } } }