Merge branch 'Navigator' of https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco into Navigator
continuous-integration/drone/push Build is passing Details

Navigator
Hugo LIVET 2 years ago
commit 59052b2f23

@ -6,7 +6,7 @@
StartupUri="MainWindow.xaml">
<Application.Resources>
<conv:Func2WindowPartConverter x:Key="Func2WpConv"/>
<!--<conv:Func2WindowPartConverter x:Key="Func2WpConv"/>-->
<Style x:Key="BorderRessource" TargetType="Border">
<Setter Property="BorderBrush" Value="#63A4FF"/>
@ -17,6 +17,15 @@
<Setter Property="Width" Value="175"/>
</Style>
<Style x:Key="TitleBorder" TargetType="Border">
<Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="Margin" Value="20"/>
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="175"/>
</Style>
<Style TargetType="UserControl" x:Key="ImageFondRessource">
<Setter Property="Background">
<Setter.Value>
@ -38,6 +47,15 @@
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="TitreDePage" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Background" Value="MediumPurple" />
<Setter Property="FontFamily" Value="Slab serif"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style TargetType="Button" x:Key="TransparentButtonRessource">
<Setter Property="Background" Value="Transparent" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
@ -72,6 +90,9 @@
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="OrangeButtonRessource" TargetType="Button">
<Setter Property="Template">
<Setter.Value>

@ -5,8 +5,21 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
d:DesignHeight="350" d:DesignWidth="600"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<Border Style="{StaticResource TitleBorder}" DockPanel.Dock="Top">
<TextBlock Text="Nom d'utilisateur" Style="{StaticResource TitreDePage}"/>
</Border>
<Button DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}" Height="25" Width="170" Margin="20">
<TextBlock Text="Modifier votre solde" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Border DockPanel.Dock="Bottom" Height="25" Width="250">
<TextBlock Text="Compte courant : ???" Style="{StaticResource TextBlockRessource}" FontSize="16" FontWeight="DemiBold"/>
</Border>
</DockPanel>
</Grid>
</UserControl>

@ -16,11 +16,11 @@
<TextBlock Text="Retour à la page d'acceuil"/>
</Button>
<Button DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
<Button DockPanel.Dock="Bottom" Click="Button_Click_Connection" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
<TextBlock Text="Se connecter" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Button DockPanel.Dock="Bottom" Style="{StaticResource OrangeButtonRessource}" Height="25" Width="170" Margin="20">
<Button DockPanel.Dock="Bottom" Click="Button_Click_Forget_Password" Style="{StaticResource OrangeButtonRessource}" Height="25" Width="170" Margin="20">
<TextBlock Text="Mot de passe oublié ?" Style="{StaticResource TextBlockRessource}"/>
</Button>
@ -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>

@ -31,5 +31,28 @@ namespace IHM
Nav.NavigateTo(Navigator.PART_CONNEXION, Navigator.PART_MAIN);
}
private void Button_Click_Connection(object sender, RoutedEventArgs e)
{
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)
{
// TO DO
}
}
}

@ -16,7 +16,7 @@
<TextBlock Text="Retour à la page d'acceuil"/>
</Button>
<Button DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
<Button DockPanel.Dock="Bottom" Click="Button_Click_Validation" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
<TextBlock Text="Valider" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Grid>

@ -30,5 +30,10 @@ namespace IHM
{
Nav.NavigateTo(Navigator.PART_CONNEXION, Navigator.PART_MAIN);
}
private void Button_Click_Validation(object sender, RoutedEventArgs e)
{
// TO DO
}
}
}

Loading…
Cancel
Save