Example #1
0
        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.");
            }
        }
Example #2
0
        public MainForm()
        {
            Instance = this;
            InitializeComponent();


        }
Example #3
0
        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();
            }
        }
Example #4
0
 public AddLayer(MainForm main)
 {
     InitializeComponent();
     textBox1.Text = "Layer" + (MainForm.Instance.treeView1.Nodes[0].GetNodeCount(false)+1).ToString().PadLeft(2).Replace(" ", "0");
 }
Example #5
0
 public AddLayer(MainForm main)
 {
     InitializeComponent();
 }