From 582d663baa7eca0dcc47b8b1274232d5b4d17819 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Fri, 8 Nov 2024 09:16:22 +0100 Subject: [PATCH] fix message boxes --- Avalonia.EliteBGS/MainWindow.axaml.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Avalonia.EliteBGS/MainWindow.axaml.cs b/Avalonia.EliteBGS/MainWindow.axaml.cs index 61b9e4c..f181735 100644 --- a/Avalonia.EliteBGS/MainWindow.axaml.cs +++ b/Avalonia.EliteBGS/MainWindow.axaml.cs @@ -398,8 +398,12 @@ public partial class MainWindow : Window { Config.SaveGlobal(); } catch (Exception error) { var box = MessageBoxManager - .GetMessageBoxStandard("There was an error saving your settings" + error.Message); - box.Show(); + .GetMessageBoxStandard( + "Error", + "There was an error saving your settings" + error.Message + ); + var result = box.ShowAsPopupAsync(this); + result.Wait(); } } @@ -677,12 +681,13 @@ public partial class MainWindow : Window { } catch (Exception) { var box = MessageBoxManager .GetMessageBoxStandard( + "Sorry!", "The log could not be split into discord appropriate length.\n" + "This happens with the bigger logs formats if you do lots of things in one system.\n" + - "Try posting the log in the OneLine format.", - "Sorry!" + "Try posting the log in the OneLine format. " ); - box.Show(); + var result = box.ShowAsPopupAsync(this); + result.Wait(); return; }