ClassiCube/Launcher2/Program.cs
UnknownShadow200 1e19178b88 Release 0.98.8
2016-03-31 00:10:41 +11: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.98.8";
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;
}
}
}