binding avec fake data fini sur planification, echeance et operation
continuous-integration/drone/push Build is passing Details

UI_Windows
Nicolas MAYE 2 years ago
parent 67d9773fb8
commit fe81d4592c

@ -38,63 +38,63 @@
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="15" x:Name="windowAjout">
<Grid BackgroundColor="{StaticResource Yellow300Accent}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" x:Name="windowAjout">
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" /> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" />
<Label Text="Type" Grid.Column="2" TextColor="{StaticResource Secondary}" />
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" />
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" />
<CollectionView.ItemTemplate>
<ListView Grid.Row="1" Grid.ColumnSpan="5" Grid.RowSpan="6" ItemsSource="{Binding Mgr}">
<ListView.ItemTemplate>
<DataTemplate> <DataTemplate>
<ViewCell>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="{Binding Nom}" Grid.Column="0" TextColor="{StaticResource Tertiary}" />
<Label Text="12/12/2022" Grid.Column="1" TextColor="{StaticResource Secondary}" />
<Label Text="CB" Grid.Column="2" TextColor="{StaticResource Secondary}" />
<Label Text="Alimentation" Grid.Column="3" TextColor="{StaticResource Secondary}" />
<Label Text="55€" Grid.Column="4" TextColor="{StaticResource Secondary}" />
</Grid> <Label Grid.Column="0" Text="{Binding IntituleOperation}"
</ViewCell> TextColor="{StaticResource Secondary}"
</DataTemplate> FontAttributes="Bold" FontSize="Body"
</ListView.ItemTemplate> HorizontalOptions="Center"
</ListView> VerticalOptions="Center"/>
</Grid> <Label Grid.Column="1" Text="{Binding DateOperation}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding ModePayement}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding Tag}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="4" Text="{Binding Montant}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView> </ContentView>

@ -10,10 +10,35 @@ public partial class CV_Planification : ContentView
public Manager Mgr => (App.Current as App).Manager; public Manager Mgr => (App.Current as App).Manager;
List<Planification> planification;
public CV_Planification() public CV_Planification()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = this;
planification = new List<Planification>();
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
BindingContext = planification;
} }

@ -42,65 +42,63 @@
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="3" Margin="15" x:Name="windowAjout"> <ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" x:Name="windowAjout">
<Grid BackgroundColor="{StaticResource Yellow300Accent}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" /> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" />
<Label Text="Type" Grid.Column="2" TextColor="{StaticResource Secondary}" />
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" />
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" />
<CollectionView.ItemTemplate>
<ListView Grid.Row="4" Grid.ColumnSpan="5" Grid.RowSpan="6" ItemsSource="{Binding Mgr}">
<ListView.ItemTemplate>
<DataTemplate> <DataTemplate>
<ViewCell>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="{Binding Nom}" Grid.Column="0" TextColor="{StaticResource Tertiary}" />
<Label Text="12/12/2022" Grid.Column="1" TextColor="{StaticResource Secondary}" />
<Label Text="CB" Grid.Column="2" TextColor="{StaticResource Secondary}" />
<Label Text="Alimentation" Grid.Column="3" TextColor="{StaticResource Secondary}" />
<Label Text="55€" Grid.Column="4" TextColor="{StaticResource Secondary}" />
</Grid> <Label Grid.Column="0" Text="{Binding IntituleOperation}"
</ViewCell> TextColor="{StaticResource Secondary}"
</DataTemplate> FontAttributes="Bold" FontSize="Body"
</ListView.ItemTemplate> HorizontalOptions="Center"
</ListView> VerticalOptions="Center"/>
</Grid> <Label Grid.Column="1" Text="{Binding DateOperation}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding ModePayement}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding Tag}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="4" Text="{Binding Montant}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</ContentView>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>

@ -1,10 +1,31 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class Echeancier : ContentView public partial class Echeancier : ContentView
{ {
List<Echeance> echeancier;
public Echeancier() public Echeancier()
{ {
InitializeComponent(); InitializeComponent();
echeancier = new List<Echeance>();
echeancier.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
echeancier.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
echeancier.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
echeancier.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
echeancier.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
echeancier.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
BindingContext = echeancier;
} }
private void SaveEcheance_Clicked(object sender, EventArgs e) private void SaveEcheance_Clicked(object sender, EventArgs e)

@ -59,7 +59,7 @@
<ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="15" x:Name="windowAjout"> <ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" x:Name="windowAjout">
<CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2"> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
@ -78,19 +78,19 @@
<Label Grid.Column="0" Text="{Binding Nom}" <Label Grid.Column="0" Text="{Binding IntituleOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding Date}" <Label Grid.Column="1" Text="{Binding DateOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding Type}" <Label Grid.Column="2" Text="{Binding ModePayement}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"

@ -17,7 +17,22 @@ public partial class Operations : ContentView
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true)); 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("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("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));

Loading…
Cancel
Save