static void Main(string[] args) { Logger.Instance.log("Application started."); try { Application.EnableVisualStyles(); MainForm form = new MainForm(); form.Show(); Logger.Instance.log("Creating Game1 object."); using (Game1 game = new Game1(form.getHandle())) { game.Run(); } } catch (Exception e) { Logger.Instance.log("Exception caught: \n\n " + e.Message + "\n\n" + e.StackTrace); if (e.InnerException != null) Logger.Instance.log("Inner Exception: " + e.InnerException.Message); MessageBox.Show("An exception was caught. Application will end. Please check the file log.txt."); } finally { Logger.Instance.log("Application ended."); } }
public MainForm() { Instance = this; InitializeComponent(); }
private static void runApp() { Application.EnableVisualStyles(); MainForm form = new MainForm(); form.Show(); Logger.Instance.log("Creating Game1 object."); using (Game1 game = new Game1(form.getHandle())) { game.Run(); } }
public AddLayer(MainForm main) { InitializeComponent(); textBox1.Text = "Layer" + (MainForm.Instance.treeView1.Nodes[0].GetNodeCount(false)+1).ToString().PadLeft(2).Replace(" ", "0"); }
public AddLayer(MainForm main) { InitializeComponent(); }