Guest User

Untitled

a guest
Jul 24th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PolyEngineRuntime, Main.cs:
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Reflection;
  7. using System.Windows.Forms;
  8. using System.IO;
  9. using PolyEngine;
  10.  
  11. namespace PolyEngineRuntime
  12. {
  13.     class Program
  14.     {
  15.         static void Main(string[] args)
  16.         {
  17.             var program = new Program();
  18.             program.Run(args);
  19.         }
  20.  
  21.         public void Run(string[] args)
  22.         {
  23.             Log.Initialize();
  24.             try
  25.             {
  26.                 Log.Write("Loading Game.dll");
  27.                 Assembly game = Assembly.LoadFile(Directory.GetCurrentDirectory() + "\\Bin\\Game.dll");
  28.             }
  29.             catch(FileNotFoundException fnfe)
  30.             {
  31.                 Log.Write(string.Format("Cannot find Game.dll. ({0})", fnfe.Message));
  32.                 MessageBox.Show("Cannot find game core. (Game.dll)");
  33.                 Environment.Exit(-1);
  34.             }
  35.             catch(Exception ex)
  36.             {
  37.                 Log.Write(string.Format("Unexpected error while loading Game.dll ({0})", ex.Message));
  38.                 MessageBox.Show("Error: " + ex.Message);
  39.                 Environment.Exit(-1);
  40.             }
  41.             Log.Write("Game.dll loaded successful.");
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment