Example #1
0
        static void Main()
        {
            try {
                // setup global bug tracker
                Application.ThreadException += new ThreadExceptionEventHandler(BugTracking.OnThreadException);

                // setup main thread
                Thread mainThread = Thread.CurrentThread;
                mainThread.Name = "ExoEngine.MainThread";

                // setup data directories
                sTexturePath       = GetDataPath("Textures");
                sWorldcraftMapPath = GetDataPath("Maps");
                sWorldPath         = GetDataPath("Worlds");
                sSpritePath        = GetDataPath("Sprites");
                sScreenshotPath    = GetDataPath("");

                // create main form
                _mainform = new MainForm();
                _mainform.Initialize();

                // run application
                Application.Run(_mainform);
                _mainform = null;
            }
            catch (Exception e) {
                BugTracking.LogException(e);
            }
        }