AppDbUpdater: Using async/await

This commit is contained in:
2024-01-05 10:20:53 +01:00
parent ba55692cbe
commit ab61edc402
2 changed files with 179 additions and 178 deletions

View File

@ -66,7 +66,7 @@ namespace Elwig {
CurrentApp = this;
}
protected override void OnStartup(StartupEventArgs evt) {
protected override async void OnStartup(StartupEventArgs evt) {
var locale = new CultureInfo("de-AT");
locale.NumberFormat.CurrencyGroupSeparator = "\u202f";
locale.NumberFormat.NumberGroupSeparator = "\u202f";
@ -83,7 +83,7 @@ namespace Elwig {
Version = typeof(App).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion.Split("+")[0] ?? "0.0.0";
try {
AppDbUpdater.CheckDb();
await AppDbUpdater.CheckDb();
} catch (Exception e) {
MessageBox.Show($"Invalid Database:\n\n{e.Message}", "Invalid Database", MessageBoxButton.OK, MessageBoxImage.Error);
Shutdown();