static void Main() { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppDomain.CurrentDomain.FirstChanceException += new EventHandler <System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>(CurrentDomain_FirstChanceException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); ServerLoader.LoadComplete += new EventHandler(ServerLoader_LoadComplete); ServerLoader.LoadServer(); Application.Run(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
static void Main() { try { AppDomain.CurrentDomain.FirstChanceException += new EventHandler <System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>(CurrentDomain_FirstChanceException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Console.WriteLine("Pulling scripts..."); Scripting.ScriptRepoHelper.PullChanges(); ServerLoader.LoadServer(); while (true) { Console.ReadLine(); } } catch (Exception ex) { ServerConsole.WriteLine(ex.ToString()); } }