|
|
|
@ -345,8 +345,13 @@ namespace StabilityMatrix
|
|
|
|
|
private void App_OnExit(object sender, ExitEventArgs e) |
|
|
|
|
{ |
|
|
|
|
serviceProvider?.GetRequiredService<LaunchViewModel>().OnShutdown(); |
|
|
|
|
var settingsManager = serviceProvider?.GetRequiredService<ISettingsManager>(); |
|
|
|
|
|
|
|
|
|
if (settingsManager?.TryFindLibrary() ?? false) |
|
|
|
|
{ |
|
|
|
|
serviceProvider?.GetRequiredService<ILiteDbContext>().Dispose(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[DoesNotReturn] |
|
|
|
|
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) |
|
|
|
|