ClassiCube/Launcher2/Program.cs
UnknownShadow200 a34ed8abfb Release 0.99.0
2016-05-15 21:14:32 +10:00

31 lines
879 B
C#

// ClassicalSharp copyright 2014-2016 UnknownShadow200 | Licensed under MIT
using System;
using System.IO;
using ClassicalSharp;
namespace Launcher {
internal static class Program {
public const string AppName = "ClassicalSharp Launcher 0.99.0";
public static string AppDirectory;
public static bool ShowingErrorDialog = false;
[STAThread]
static void Main( string[] args ) {
AppDirectory = AppDomain.CurrentDomain.BaseDirectory;
string logPath = Path.Combine( AppDirectory, "launcher.log" );
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
ErrorHandler.InstallHandler( logPath );
LauncherWindow window = new LauncherWindow();
window.Run();
}
static void UnhandledExceptionHandler( object sender, UnhandledExceptionEventArgs e ) {
ShowingErrorDialog = true;
}
}
}