From 3142183cee8fbe4da2fdaab9d78dc160f6ab2fad Mon Sep 17 00:00:00 2001 From: Taarly Date: Mon, 12 May 2025 15:31:31 +0200 Subject: [PATCH] added dialogue window if the user makes an unexpected / wrong input. --- Project.View/NewLogin/NewLogin.axaml.cs | 6 +++++- Project.View/PopUp/PopUp.axaml | 22 ++++++++++++++++++++++ Project.View/PopUp/PopUp.axaml.cs | 21 +++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Project.View/PopUp/PopUp.axaml create mode 100644 Project.View/PopUp/PopUp.axaml.cs diff --git a/Project.View/NewLogin/NewLogin.axaml.cs b/Project.View/NewLogin/NewLogin.axaml.cs index 5be1bcd..c48bfea 100644 --- a/Project.View/NewLogin/NewLogin.axaml.cs +++ b/Project.View/NewLogin/NewLogin.axaml.cs @@ -39,7 +39,11 @@ public partial class NewLogin : Window } else { - throw new Exception("Master Login Creation Failed"); + NewLoginUsernameBox.Text = string.Empty; + NewLoginPasswordBox.Text = string.Empty; + NewLoginEmailBox.Text = string.Empty; + var ShowPopup = new PopUp(); + ShowPopup.ShowDialog(this); } } diff --git a/Project.View/PopUp/PopUp.axaml b/Project.View/PopUp/PopUp.axaml new file mode 100644 index 0000000..b3b9887 --- /dev/null +++ b/Project.View/PopUp/PopUp.axaml @@ -0,0 +1,22 @@ + + + + + + + + +