Added dictionnaries

dictionnaire
Matheo HERSAN 2 years ago
parent 77b174e9af
commit 9f91e81793

@ -405,6 +405,22 @@
<Style TargetType="ImageButton" x:Key="ImageAnime">
<Setter Property="HeightRequest" Value="150" />
<Setter Property="WidthRequest" Value="150" />
<Setter Property="CornerRadius" Value="15" />
</Style>
<Style TargetType="Button" x:Key="Bouton">
<Setter Property="BackgroundColor" Value="#bd93f9" />
<Setter Property="TextColor" Value="#FFFFFF" />
</Style>
<Style TargetType="Entry" x:Key="Champs">
<Setter Property="Background" Value="#EFF0F2"/>
<Setter Property="TextColor" Value="Black"/>
</Style>
<Style TargetType="Entry" x:Key="ChampsMdp" BasedOn="{StaticResource Champs}">
<Setter Property="IsPassword" Value="True" />
</Style>
</ResourceDictionary>

@ -9,11 +9,11 @@
<Label Text="Se connecter à MapManga" FontSize="Large" Margin="0,0,0,20" TextColor="#FFFFFF"/>
<Entry x:Name="emailEntry" Placeholder="Email" Margin="0,0,0,10" BackgroundColor="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="emailEntry" Placeholder="Email" Margin="0,0,0,10" Style="{StaticResource Champs}"/>
<Entry x:Name="passwordEntry" Placeholder="Mot de passe" IsPassword="True" Margin="0,0,0,20" BackgroundColor="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="passwordEntry" Placeholder="Mot de passe" Margin="0,0,0,20" Style="{StaticResource Champs}"/>
<Button Text="Se connecter" Clicked="OnLoginClicked" BackgroundColor="{StaticResource Primary }" TextColor="#FFFFFF"/>
<Button Text="Se connecter" Clicked="OnLoginClicked" Style="{StaticResource Bouton}"/>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Label Text="Pas de compte ? " TextColor="#FFFFFF"/>

@ -10,9 +10,9 @@
<StackLayout VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="1">
<Button Text="Deconnexion" Clicked="OnLoginClicked" BackgroundColor="{StaticResource Primary}" Margin="0,0,0,30" TextColor="#FFFFFF"/>
<Button Text="Deconnexion" Clicked="OnLoginClicked" Margin="0,0,0,30" Style="{StaticResource Bouton}"/>
<Button Text="Connexion/Inscription" Clicked="OnLoginClicked" BackgroundColor="{StaticResource Primary}" TextColor="#FFFFFF"/>
<Button Text="Connexion/Inscription" Clicked="OnLoginClicked" Style="{StaticResource Bouton}"/>
</StackLayout>
</Grid>

@ -5,31 +5,29 @@
Background="{StaticResource Secondary}">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="S'inscrire a MapManga" FontSize="Large" Margin="0,0,0,20" TextColor="#ffffff"/>
<Entry x:Name="nameEntry" Placeholder="Nom" Margin="0,0,0,10" Background="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="nameEntry" Placeholder="Nom" Margin="0,0,0,10" Style="{StaticResource Champs}"/>
<Entry x:Name="firstNameEntry" Placeholder="Prénom" Margin="0,0,0,10" Background="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="firstNameEntry" Placeholder="Prénom" Margin="0,0,0,10" Style="{StaticResource Champs}"/>
<Entry x:Name="ageEntry" Placeholder="Âge" Margin="0,0,0,10" Background="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="ageEntry" Placeholder="Âge" Margin="0,0,0,10" Style="{StaticResource Champs}"/>
<Entry x:Name="emailEntry" Placeholder="Email" Margin="0,0,0,10" BackgroundColor="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="emailEntry" Placeholder="Email" Margin="0,0,0,10" Style="{StaticResource Champs}"/>
<Entry x:Name="usernameEntry" Placeholder="Nom d'utilisateur" Margin="0,0,0,10" BackgroundColor="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="usernameEntry" Placeholder="Nom d'utilisateur" Margin="0,0,0,10" Style="{StaticResource Champs}"/>
<Entry x:Name="passwordEntry" Placeholder="Mot de passe" IsPassword="True" Margin="0,0,0,10" BackgroundColor="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="passwordEntry" Placeholder="Mot de passe" Margin="0,0,0,10" Style="{StaticResource ChampsMdp}"/>
<Entry x:Name="confirmPasswordEntry" Placeholder="Confirmer le mot de passe" IsPassword="True" Margin="0,0,0,20" BackgroundColor="#EFF0F2" TextColor="{StaticResource Black}"/>
<Entry x:Name="confirmPasswordEntry" Placeholder="Confirmer le mot de passe" Margin="0,0,0,20" Style="{StaticResource ChampsMdp}"/>
<Button Text="S'inscire" Clicked="OnSignUpClicked" BackgroundColor="{StaticResource Primary}" TextColor="#FFFFFF"/>
<Button Text="S'inscire" Clicked="OnSignUpClicked" Style="{StaticResource Bouton}"/>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Label Text="Pas de compte ? " TextColor="#FFFFFF"/>
<Label Text="S'inscrire" TextColor="{StaticResource Primary}">
</Label>
<Label Text="Déjà un compte ? " TextColor="#FFFFFF"/>
<Label Text="Se connecter" TextColor="{StaticResource Primary}"/>
</StackLayout>
</StackLayout>

@ -24,11 +24,6 @@ public partial class signUpPage : ContentPage
string password = passwordEntry.Text;
string confirmPassword = confirmPasswordEntry.Text;
if (age < 5)
{
await DisplayAlert("Erreur", "Il faut avoir au minimum 5 ans pour utiliser l'application.", "OK");
return;
}
if (string.IsNullOrWhiteSpace(email) ||
string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(confirmPassword))
@ -37,6 +32,12 @@ public partial class signUpPage : ContentPage
return;
}
if (age < 5)
{
await DisplayAlert("Erreur", "Il faut avoir au minimum 5 ans pour utiliser l'application.", "OK");
return;
}
// Vérifier que l'e-mail a la bonne forme
if (!Regex.IsMatch(email, @"^[^@\s]+@[^@\s]+\.[^@\s]+$"))
{

Loading…
Cancel
Save