From f13896d59a6269bbb05a7ff1a9bc37d6680ec5af Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Mon, 27 Feb 2023 23:07:07 +0100 Subject: [PATCH] Mark input as changed --- WGneu/Validator.cs | 10 ++- WGneu/Windows/MemberListWindow.xaml | 15 ++++ WGneu/Windows/MemberListWindow.xaml.cs | 105 +++++++++++++++++++++++-- 3 files changed, 119 insertions(+), 11 deletions(-) diff --git a/WGneu/Validator.cs b/WGneu/Validator.cs index 53a9144..491fc3e 100644 --- a/WGneu/Validator.cs +++ b/WGneu/Validator.cs @@ -32,12 +32,16 @@ namespace WGneu { { "423", Array.Empty() }, }; - public static void SetInputInvalid(TextBox input) { + public static void SetInputChanged(Control input) { + input.BorderBrush = System.Windows.Media.Brushes.Orange; + } + + public static void SetInputInvalid(Control input) { input.BorderBrush = System.Windows.Media.Brushes.Red; } - public static void SetInputValid(TextBox input) { - input.ClearValue(TextBox.BorderBrushProperty); + public static void ClearInputStatus(Control input) { + input.ClearValue(Control.BorderBrushProperty); } public static ValidationResult CheckNumericInput(TextBox input, bool optional) { diff --git a/WGneu/Windows/MemberListWindow.xaml b/WGneu/Windows/MemberListWindow.xaml index a046a48..eb34e28 100644 --- a/WGneu/Windows/MemberListWindow.xaml +++ b/WGneu/Windows/MemberListWindow.xaml @@ -91,18 +91,22 @@