Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PolyEngineRuntime, Main.cs:
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Reflection;
- using System.Windows.Forms;
- using System.IO;
- using PolyEngine;
- namespace PolyEngineRuntime
- {
- class Program
- {
- static void Main(string[] args)
- {
- var program = new Program();
- program.Run(args);
- }
- public void Run(string[] args)
- {
- Log.Initialize();
- try
- {
- Log.Write("Loading Game.dll");
- Assembly game = Assembly.LoadFile(Directory.GetCurrentDirectory() + "\\Bin\\Game.dll");
- }
- catch(FileNotFoundException fnfe)
- {
- Log.Write(string.Format("Cannot find Game.dll. ({0})", fnfe.Message));
- MessageBox.Show("Cannot find game core. (Game.dll)");
- Environment.Exit(-1);
- }
- catch(Exception ex)
- {
- Log.Write(string.Format("Unexpected error while loading Game.dll ({0})", ex.Message));
- MessageBox.Show("Error: " + ex.Message);
- Environment.Exit(-1);
- }
- Log.Write("Game.dll loaded successful.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment