amélioration de l'ui pour forcer le remplissage des champs de l'UCConnexion
continuous-integration/drone/push Build is passing Details

Navigator
Vincent ASTOLFI 2 years ago
parent 71acf8aac1
commit fbd7694f58

@ -36,26 +36,36 @@
<TextBlock Style="{StaticResource TextBlockRessource}" FontSize="15">Nom d'utilisateur</TextBlock>
<Border Grid.Column="1" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
<StackPanel Grid.Column="1" Margin="30">
<TextBlock x:Name="ErrorUserName" HorizontalAlignment="Center" FontSize="15" Foreground="#FF6347" Visibility="Hidden">Veuillez renseigner votre nom d'utilisateurs</TextBlock>
<Border Grid.Column="1" Style="{StaticResource BorderRessource}">
<TextBox x:Name="UserName">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
</StackPanel>
<TextBlock Grid.Row="1" Style="{StaticResource TextBlockRessource}" FontSize="15">Mot de passe</TextBlock>
<Border Grid.Column="1" Grid.Row="1" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
<StackPanel Grid.Row="1" Grid.Column="1">
<TextBlock x:Name="ErrorPassword" HorizontalAlignment="Center" FontSize="15" Foreground="#FF6347" Visibility="Hidden">Veuillez renseigner votre mot de passe</TextBlock>
<Border Style="{StaticResource BorderRessource}">
<PasswordBox x:Name="Password">
<PasswordBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</PasswordBox.Resources>
</PasswordBox>
</Border>
</StackPanel>
</Grid>
</DockPanel>
</UserControl>

@ -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)

Loading…
Cancel
Save