static void Main() { Logger.CreateFile(); Logger.WriteLine(Logger.Stage.INIT_MAIN, "starting program..."); Logger.WriteLine(Logger.Stage.INIT_MAIN, String.Format("date : {0}.", DateTime.Now.ToString())); Logger.WriteLine(Logger.Stage.INIT_MAIN, String.Format("game version : {0}.", SetupConfig.GAME_VERSION)); Application.CurrentCulture = CultureInfo.InvariantCulture; // avoids nasty "," vs "." format confusion. Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SetupConfig.CreateDir(); using (RogueForm form = new RogueForm()) { // Debug mode : don't catch exceptions, I want to debug them. // Release mode : catch exceptions cleanly and report. #if DEBUG form.Run(); #else try { form.Run(); } catch (Exception e) { using (Bugreport report = new Bugreport(e)) { report.ShowDialog(); } Application.Exit(); } #endif } Logger.WriteLine(Logger.Stage.CLEAN_MAIN, "exiting program..."); }
public void BindForm(RogueForm form) { m_RogueForm = form; FillGameForm(); }