From fbd7694f586c9511d3ea1f2238fd6347ca52fcab Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Wed, 12 Oct 2022 15:09:59 +0200 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20de=20l'ui=20pour=20forcer?= =?UTF-8?q?=20le=20remplissage=20des=20champs=20de=20l'UCConnexion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Code/IHM/UCConnexion.xaml | 46 ++++++++++++++++++++++-------------- Code/IHM/UCConnexion.xaml.cs | 15 +++++++++++- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/Code/IHM/UCConnexion.xaml b/Code/IHM/UCConnexion.xaml index 5c947e3..37f6298 100644 --- a/Code/IHM/UCConnexion.xaml +++ b/Code/IHM/UCConnexion.xaml @@ -36,26 +36,36 @@ Nom d'utilisateur - - - - - - - + + Veuillez renseigner votre nom d'utilisateurs + + + + + + + + + Mot de passe - - - - - - - + + + Veuillez renseigner votre mot de passe + + + + + + + + + + diff --git a/Code/IHM/UCConnexion.xaml.cs b/Code/IHM/UCConnexion.xaml.cs index 1ad5266..1292480 100644 --- a/Code/IHM/UCConnexion.xaml.cs +++ b/Code/IHM/UCConnexion.xaml.cs @@ -33,7 +33,20 @@ namespace IHM private void Button_Click_Connection(object sender, RoutedEventArgs e) { - // TO DO + ErrorPassword.Visibility = Visibility.Hidden; + Password.Background = new SolidColorBrush(Colors.White); + ErrorUserName.Visibility = Visibility.Hidden; + UserName.Background = new SolidColorBrush(Colors.White); + if (UserName.Text.ToString() == "") + { + ErrorUserName.Visibility = Visibility.Visible; + UserName.Background = new BrushConverter().ConvertFromString("#FF6347") as SolidColorBrush; + } + if (Password.Password.ToString() == "") + { + ErrorPassword.Visibility = Visibility.Visible; + Password.Background = new BrushConverter().ConvertFromString("#FF6347") as SolidColorBrush; + } } private void Button_Click_Forget_Password(object sender, RoutedEventArgs e)