pull/143/head
Nicolas MAYE 2 years ago
commit 8346bdc69f

@ -14,7 +14,7 @@
<ShellContent Title="Opérations"
Icon="dollar_black.png"
ContentTemplate="{DataTemplate local:Operations}" />
<ShellContent Title="Planification"
<ShellContent Title="Echeance"
Icon="planification_black.png"
ContentTemplate="{DataTemplate local:Planification}" />
<ShellContent Title="Paramètres"

@ -12,7 +12,7 @@ public partial class MainPage : ContentPage
BindingContext = this;
}
public void ConnectionOnClicked(object sender, EventArgs e)
public async void ConnectionOnClicked(object sender, EventArgs e)
{
if (EntryMail.Text == null || EntryPassworld.Text == null)
{
@ -20,12 +20,13 @@ public partial class MainPage : ContentPage
}
else
{
/*if (Mgr.existEmail(EntryMail.Text))
if (await Mgr.Pers.EmailDisponible(EntryMail.Text))
{
if (Mgr.isEqualHash(Mgr.recupMdpBdd(EntryMail.Text), EntryPassworld.Text))
if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text))
{
Mgr.createUser(EntryMail.Text);
ConnexionValide();
Navigation.PushAsync(new Dashboard());
}
else
{
@ -35,16 +36,12 @@ public partial class MainPage : ContentPage
else
{
AffichError("Compte inexistant", "Email ou mot de passe invalide", "OK");
}*/
}
}
private async void ConnexionValide()
{
Navigation.PushAsync(new Dashboard());
//await Navigation.PopModalAsync();
}
private async void AffichError(string s, string s1, string s2)
{
await DisplayAlert(s, s1, s2);

@ -46,78 +46,82 @@
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding LesOpe}">
<CollectionView x:Name="DerniereOpe" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid Margin="0,7,0,7">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<!--<ColumnDefinition/>-->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}"
CornerRadius="10"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding NomOpe}"
FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1"
CornerRadius="10"/>-->
<Label Grid.Row="0" Grid.Column="0"
Text="{Binding IntituleOperation}"
FontAttributes="Bold"
FontSize="Body"
Margin="50,0,0,0"/>
<Label Grid.Row="1" Grid.Column="0"
Text="{Binding DetailTypeOpe}"
FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOpe}"/>
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding MontantOpe}"
FontAttributes="Bold"/>
Text="{Binding DateOperation}"/>
<Label Grid.Row="1" Grid.Column="2"
Text="{Binding Montant}"
FontAttributes="Bold"
TextColor="OrangeRed"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Label Grid.Row="3" Grid.ColumnSpan="2" Text="Liste des Comptes favoris :" FontAttributes="Bold" FontSize="Body" Padding="20,0,0,0"/>
<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding ComptesFav}" ItemsLayout="HorizontalList">
<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding User.LesBanques}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="1.75*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="{Binding Banque}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding Type}"
FontAttributes="Italic"/>
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding Solde}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateMaJ}"/>
<Label Grid.Column="0" Text="{Binding Nom}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<ImageButton Grid.Column="2" Source="reload_banks.png"
Padding="10" Margin="5"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ScrollView>
</ContentPage>

@ -6,10 +6,13 @@ namespace IHM.Mobile;
public partial class DashBoard : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
List<Operation> operations;
public DashBoard()
{
InitializeComponent();
//Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
//
BindingContext = Mgr;
if (Mgr.User == null)
@ -18,11 +21,20 @@ public partial class DashBoard : ContentPage
}
operations = new List<Operation>();
operations.Add(new("Internet", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("Course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("Spotify", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("Garage", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
/*if (!Mgr.Pers.TestConnexion())
{
loadPage(new ErrorPage());
Debug.WriteLine("cc");
}*/
DerniereOpe.ItemsSource = operations;
}

@ -32,6 +32,7 @@
<Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste de vos banques : " FontAttributes="Bold" FontSize="Body" Padding="20,10,0,0"/>
<ScrollView>
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding User.LesBanques}">
<CollectionView.ItemTemplate>
<DataTemplate>
@ -57,7 +58,7 @@
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ScrollView>
</Grid>

@ -26,7 +26,9 @@ namespace IHM.Mobile
if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text))
{
Mgr.createUser(EntryMail.Text);
await Navigation.PopModalAsync();
Mgr.LoadBanques();
}
else
{

@ -2,11 +2,14 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Mobile.Operations">
<ScrollView>
<VerticalStackLayout>
<ListView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding User.LesBanques[0].ListeDesComptes[0].LesOpe}">
<ListView.ItemTemplate>
<Label Text="Mes Opérations :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/>
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding }">
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10" >
<Grid Margin="0,7,0,7">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
@ -21,20 +24,24 @@
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}"
CornerRadius="10"/>-->
<Label Grid.Row="0" Grid.Column="1"
<Label Grid.Row="0" Grid.Column="0"
Text="{Binding IntituleOperation}"
FontAttributes="Bold" TextColor="Brown" />
<Label Grid.Row="1" Grid.Column="1"
FontAttributes="Bold"
FontSize="Body"
Margin="50,0,0,0"/>
<Label Grid.Row="1" Grid.Column="0"
Text="{Binding DetailTypeOpe}"
FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOperation}"/>
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
<Label Grid.Row="1" Grid.Column="2"
Text="{Binding Montant}"
FontAttributes="Bold"/>
FontAttributes="Bold"
TextColor="OrangeRed"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -6,9 +6,37 @@ namespace IHM.Mobile;
public partial class Operations : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
List<Operation> operations;
public Operations()
{
InitializeComponent();
BindingContext = Mgr;
//BindingContext = Mgr;
operations = new List<Operation>();
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
BindingContext = operations;
}
}

@ -2,134 +2,47 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IHM.Composant"
x:Class="IHM.Mobile.Planification"
BackgroundColor="#A00EE8">
<ScrollView VerticalOptions="FillAndExpand">
x:Class="IHM.Mobile.Planification">
<ScrollView>
<VerticalStackLayout>
<StackLayout Orientation="Horizontal">
<Label
Text="Bienvenue"
VerticalOptions="Center"
HorizontalOptions="Start"
Margin="10,10,10,20"
FontSize="25"
/>
<Label
FontAttributes="Bold"
Margin="0,10,0,0"
Text="{Binding User.Prenom}"
FontSize="25"
/>
</StackLayout>
<Button
BackgroundColor="Red"
x:Name="Bouton"
WidthRequest="50"
HeightRequest="50"
HorizontalOptions="End"
Margin="0,0,40,0"
Clicked="OnClickedGestionBanque"
/>
<Button
IsVisible="False"
IsEnabled="False"
WidthRequest="175"
HeightRequest="50"
Margin="0,-50,0,0"
x:Name="ImgBanqueActuelle"
BackgroundColor="AliceBlue"
Text="{Binding selectedBanque}"
/>
<Button
IsVisible="false"
BackgroundColor="Black"
x:Name="BoutonRetour"
WidthRequest="50"
HeightRequest="50"
HorizontalOptions="End"
Margin="0,-50,40,0"
Clicked="OnClickedRetour"
/>
<StackLayout IsVisible="false" x:Name="stackpannel">
<CollectionView x:Name="listeBanque" ItemsSource="{Binding User.LesBanques}" ItemsUpdatingScrollMode="KeepScrollOffset" Margin="22,0,22,0" ItemsLayout="HorizontalList">
<Label Text="Mes Echeances du mois :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/>
<CollectionView x:Name="Ech">
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout Margin="0,35,0,0">
<Button Clicked="OnClickedBanque" Text="{Binding Nom}"/>
</StackLayout>
<Grid Margin="0,7,0,7">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition/>-->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}"
CornerRadius="10"/>-->
<Label Grid.Row="0" Grid.Column="0"
Text="{Binding IntituleOperation}"
FontAttributes="Bold"
FontSize="Body"
Margin="50,0,0,0"/>
<Label Grid.Row="1" Grid.Column="0"
Text="{Binding DetailTypeOpe}"
FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOperation}"/>
<Label Grid.Row="1" Grid.Column="2"
Text="{Binding Montant}"
FontAttributes="Bold"
TextColor="OrangeRed"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
<StackLayout Margin="0,20,0,0" Orientation="Horizontal">
<Label Margin="20,0,0,0" FontSize="25">Solde total :</Label>
<Label FontSize="25" Margin="8,0,0,0" x:Name="soldetotal">0</Label>
</StackLayout>
<Border Stroke="Black" StrokeThickness="5" Margin="0,70,0,0">
<StackLayout BackgroundColor="Cyan" Padding="0,0,0,20">
<Label HorizontalTextAlignment="Center" FontSize="20">Listes des dernières opérations</Label>
<StackLayout Orientation="Vertical">
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
</StackLayout>
</StackLayout>
</Border>
<Border Stroke="Black" StrokeThickness="5" Margin="0,70,0,30">
<StackLayout Margin="0,10,0,0">
<Label HorizontalTextAlignment="Center" FontSize="20">Pour vous</Label>
<StackLayout BackgroundColor="RosyBrown" Margin="0,0,0,20" HeightRequest="200" WidthRequest="310">
<Label HorizontalOptions="Center" FontSize="20">Aide à la gestion personnalisée</Label>
</StackLayout>
</StackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -5,47 +5,25 @@ namespace IHM.Mobile;
public partial class Planification : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
List<Operation> operations;
public Planification()
{
InitializeComponent();
BindingContext = Mgr;
//BindingContext = Mgr;
//Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
}
operations = new List<Operation>();
operations.Add(new("Vulcan Mag", 3.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("Apple Music", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
void OnClickedBanque(object sender, EventArgs args)
{
Button btn = (Button)sender;
ImgBanqueActuelle.Text = btn.Text;
}
async void OnClickedGestionBanque(object sender, EventArgs args)
{
Bouton.BackgroundColor = Color.FromRgb(192, 192, 192);
await Bouton.TranslateTo(-130, 35, 50);
await Bouton.ScaleXTo(7.5, 50);
await Bouton.ScaleYTo(3, 50);
stackpannel.IsVisible = true;
BoutonRetour.IsVisible = true;
ImgBanqueActuelle.IsVisible = true;
//await Navigation.PushModalAsync(new GestionBanque());
}
async void OnClickedRetour(object sender, EventArgs args)
{
await Bouton.ScaleXTo(1, 50);
await Bouton.ScaleYTo(1, 50);
ImgBanqueActuelle.IsVisible = false;
stackpannel.IsVisible = false;
await Bouton.TranslateTo(0, 0, 50);
BoutonRetour.IsVisible = false;
}
Ech.ItemsSource = operations;
public async void loadInscription()
{
await Navigation.PushModalAsync(new MainPage());
BindingContext = Mgr;
}
}

@ -21,4 +21,6 @@ namespace Model
Transaction,
Santé
}
}

Loading…
Cancel
Save