static void Main() { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnexpectedExHandler); string[] args = Environment.GetCommandLineArgs(); if (args.Count(a => { return(a == "/updated"); }) == 0) { MessageBox.Show("Please use the MaplerUpdater.exe instead of this binary to launch the Mapler.me software.", "Mapler.me startup", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } Logger.SetLogfile( args.Count(a => { return(a == "/packetlog"); }) > 0, (args.Count(a => { return(a == "/debug"); }) > 0 || System.IO.File.Exists("debugmode.txt")) ? false : true // 'Disabled' ); MasterThread.Load("Client"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain()); }
public static void Load(string pServerName, ulong pTicksBeforeSleep = 150) { Instance = new MasterThread(pServerName, pTicksBeforeSleep); Instance.Init(); }