Binding Connexion fonctionne parfaitement + BUG affichage SearchMob
continuous-integration/drone/push Build is passing Details

pull/32/head
Nicolas BLONDEAU 2 years ago
parent 7c9beff1c5
commit 3295b5b68a

@ -58,8 +58,8 @@
Source="connexion.png"
HeightRequest="70"
Margin="0, 0, 0, 30" />
<Entry Placeholder="Identifiant" ReturnType="Next" Completed="Id_Entry_Completed" />
<Entry Placeholder="Mot de passe" IsPassword="True" ReturnType="Done" Completed="Mdp_Entry_Completed"/>
<Entry x:Name="IdEntry" Placeholder="Identifiant" ReturnType="Next" />
<Entry x:Name="PsswEntry" Placeholder="Mot de passe" IsPassword="True" ReturnType="Next" />
<Button Style="{StaticResource buttonStyle}"
Text="Valider"
Clicked="ValiderClicked"/>

@ -15,6 +15,8 @@ public partial class Connexion : ContentPage
public async void ValiderClicked(object sender, EventArgs e)
{
id = IdEntry.Text;
mdp = PsswEntry.Text;
foreach (User u in (Application.Current as App).userManager.ListUsers)
{
if ((Application.Current as App).userManager.checkIfExists(id, mdp) && u.verifyPssw(mdp))
@ -25,7 +27,7 @@ public partial class Connexion : ContentPage
}
return;
}
/*
private void Id_Entry_Completed(object sender, EventArgs e)
{
id = ((Entry)sender).Text;
@ -34,5 +36,5 @@ public partial class Connexion : ContentPage
private void Mdp_Entry_Completed(object sender, EventArgs e)
{
mdp = ((Entry)sender).Text;
}
}*/
}

@ -18,7 +18,24 @@
<DataTemplate>
<ViewCell>
<VerticalStackLayout>
<Image Source="{Binding ImageLink}"/>
<Image Source="{Binding ImageLink}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Property="Opacity" Value="1" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Opacity" Value="0.9" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</VisualStateManager.VisualStateGroups>
</Image>
</VerticalStackLayout>
</ViewCell>
</DataTemplate>
@ -26,19 +43,35 @@
</ListView>
</Grid>
<ScrollView Grid.Column="1">
<Grid Grid.Column="1" RowDefinitions="Auto,*,*,*" BindingContext="{Binding SelectedItem, Source={x:Reference ListViewMonsters}}">
<Grid RowDefinitions="Auto,*,*,*" BindingContext="{Binding SelectedItem, Source={x:Reference ListViewMonsters}}">
<Grid Grid.Row="0" ColumnDefinitions="*,Auto" Padding="25" BackgroundColor="LightBlue">
<!-- Caractéristiques -->
<Label
BackgroundColor="DarkSalmon"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center"
Grid.Column="0"
Text="{Binding Description, StringFormat=Description : \{0\}}"
FontSize="Medium">
</Label>
<!-- Infos du monstre BUG AVEC LES FRAMES, ESSAYE DE VOIR POUR QUE CE SOIT BEAU ET QUE LE TEXTE SOIT PAS COUPE + MODIFIE LE BINDING-->
<VerticalStackLayout Grid.Column="0">
<HorizontalStackLayout>
<Label Text="Déjà vu ?" FontSize="20" TextColor="White" Margin="7"/>
<CheckBox Color="{StaticResource BleuFonce}"/>
</HorizontalStackLayout>
<Frame Margin="0" HorizontalOptions="Center" >
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Description : \{0\}}"/>
</Frame>
<Frame Margin="0">
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Caractéristiques : \{0\}}"/>
</Frame>
<Frame Margin="0">
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Apparences : \{0\}}"/>
</Frame>
<Frame Margin="0">
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Conseils : \{0\}}"/>
</Frame>
</VerticalStackLayout>
<!-- Image du mob -->
<Image Grid.Column="1" Source="{Binding CardLink}" HeightRequest="600"/>
<Image Grid.Column="1" Source="{Binding CardLink}" HeightRequest="600"/>
</Grid>
</Grid>
</ScrollView>

Loading…
Cancel
Save