ClassiCube/Launcher2/Program.cs
UnknownShadow200 21ae80972a Release 0.98.6.
2016-02-01 18:30:58 +11:00

30 lines
803 B
C#

using System;
using System.IO;
using ClassicalSharp;
namespace Launcher2 {
internal sealed class Program {
public const string AppName = "ClassicalSharp Launcher 0.98.6";
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;
}
}
}