Skip to content

Instantly share code, notes, and snippets.

@JakubMifek
Created April 15, 2018 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakubMifek/de6187cb573db8978137eb87179b38a2 to your computer and use it in GitHub Desktop.
Save JakubMifek/de6187cb573db8978137eb87179b38a2 to your computer and use it in GitHub Desktop.
private static void Main()
{
Config.Instance.Load("config.config");
AppDomain.CurrentDomain.ProcessExit += (sender, args) =>
{
Config.Instance.Save("config.config");
Config.Instance["exit"] = true;
};
MainLogger.Instance.Log("Program", Priority.Info, "Program has started.");
try
{
using (Game = new GameInterface())
{
Game.Run();
}
}
catch (Exception ex)
{
MainLogger.Instance.Log(nameof(Program), Priority.Error, $"Program exited with error: '{ex.Message}'");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment