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

@ -33,7 +33,20 @@ namespace IHM
private void Button_Click_Connection(object sender, RoutedEventArgs e) 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) private void Button_Click_Forget_Password(object sender, RoutedEventArgs e)

Loading…
Cancel
Save