public static void Init(Application app) { Global.Logger.InfoDebugLine("AppHelper.Init start"); AppDomain.CurrentDomain.UnhandledException += (object sender, UnhandledExceptionEventArgs e) => { var exception = e.ExceptionObject as Exception; if (exception != null) { Handle(exception); } }; app.DispatcherUnhandledException += (object sender, DispatcherUnhandledExceptionEventArgs e) => { Handle(e.Exception); e.Handled = true; }; Execute.InitializeWithDispatcher(); Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN"); Global.Logger.InfoDebugLine("AppHelper.Init end"); }
public static void Init(Application app) { BootLog.LogDir = Path.Combine(SpecialPath.ShareDirFullName, "Logs"); BootLog.Log("AppHelper.Init start"); AppDomain.CurrentDomain.UnhandledException += (object sender, UnhandledExceptionEventArgs e) => { var exception = e.ExceptionObject as Exception; if (exception != null) { Handle(exception); } }; app.DispatcherUnhandledException += (object sender, DispatcherUnhandledExceptionEventArgs e) => { Handle(e.Exception); e.Handled = true; }; Execute.InitializeWithDispatcher(); Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN"); BootLog.Log("AppHelper.Init end"); }
public App() { BootLog.LogDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"); BootLog.Log("App.ctor start"); AppDomain.CurrentDomain.UnhandledException += (object sender, UnhandledExceptionEventArgs e) => { var exception = e.ExceptionObject as Exception; if (exception != null) { Handle(exception); } }; DispatcherUnhandledException += (object sender, DispatcherUnhandledExceptionEventArgs e) => { Handle(e.Exception); e.Handled = true; }; Execute.InitializeWithDispatcher(); Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN"); BootLog.Log("App.InitializeComponent start"); InitializeComponent(); BootLog.Log("App.InitializeComponent end"); BootLog.Log("App.ctor end"); }