private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs) { Programm.ReportCrash((Exception)unhandledExceptionEventArgs.ExceptionObject, ""); Environment.Exit(0); }
public static void Main(string[] args) { { Application.Run((Form) new ip()); } Console.Clear(); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException); Console.Title = "Iniciando o Point Blank Game Server..."; Logger.StartedFor = "game"; Logger.checkDirectorys(); StringUtil stringUtil = new StringUtil(); stringUtil.AppendLine(" ________ _____ __ ______ _______ "); stringUtil.AppendLine(" / ____/ |/ / / / / / / / / / / / "); stringUtil.AppendLine(" / __/ / /|_/ / / / / / /__/_/ /__/ / "); stringUtil.AppendLine(" / /___/ / / / /_/ / _ / / / / / / "); stringUtil.AppendLine(" "); string str = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null).ToString("dd/MM/yyyy HH:mm"); stringUtil.AppendLine(" Data de Inicialização: " + str + " "); Logger.info(stringUtil.getString()); ConfigGS.Load(); ComDiv.GetDate(); BasicInventoryXML.Load(); ServerConfigSyncer.GenerateConfig(ConfigGS.configId); ServersXML.Load(); ChannelsXML.Load(ConfigGS.serverId); EventLoader.LoadAll(); TitlesXML.Load(); TitleAwardsXML.Load(); ClanManager.Load(); NickFilter.Load(); MissionCardXML.LoadBasicCards(1); BattleServerXML.Load(); RankXML.Load(); RankXML.LoadAwards(); ClanRankXML.Load(); MissionAwards.Load(); MissionsXML.Load(); Translation.Load(); ShopManager.Load(1); TorunamentRulesManager.LoadList(); RandomBoxXML.LoadBoxes(); CupomEffectManager.LoadCupomFlags(); bool flag1 = true; foreach (string text in args) { if (ComDiv.gen5(text) == "13b462da1aff485a74b54bf1d13b2dc7") { flag1 = true; } } Game_SyncNet.Start(); if (flag1) { bool flag2 = GameManager.Start(); Logger.warning("[Aviso] Padrão de textos: " + ConfigGB.EncodeText.EncodingName); Logger.warning("[Aviso] Modo atual: " + (ConfigGS.isTestMode ? "Testes" : "Público")); Logger.warning(Programm.StartSuccess()); if (flag2) { LoggerGS.updateRAM(); } } Process.GetCurrentProcess().WaitForExit(); }
private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e) { Programm.ReportCrash(e.Exception, ""); }