parent
e1b65d4e62
commit
8de5bec1e3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
ccc19448d3a1988841f3b15d3b883f534c70b321
|
0485af3c2a356b27a294c604ab587442c3ee700a
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "zJnbr1K2cNVLBYpUbnHuF4z2YrqcLZtGCMYMs5/AN37uZRbt2tzm2V66ZCZhXrZr0C+Z1sS90G9izHYqD33eMQ==",
|
"dgSpecHash": "9b8Tc1IUryqunTPoQZmNZ2FPzyCPIstRHRzeN9mHGzLtg8ngdErMIrZcCaDJ2ZVwD68qE4K4V9IEz5RKx/GrIQ==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "C:\\Home\\Cours\\Projet\\MVVM\\my\\MVVM\\DtoAbstractLayer\\DtoAbstractLayer.csproj",
|
"projectFilePath": "E:\\Home\\Projet\\MVVM\\MVVM\\DtoAbstractLayer\\DtoAbstractLayer.csproj",
|
||||||
"expectedPackageFiles": [],
|
"expectedPackageFiles": [],
|
||||||
"logs": []
|
"logs": []
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
8315acbaa2987403c52eddc5a815828270122856
|
7a4c812f183337b8ebdd7847e167c339cc07dc7a
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "rof1n9po4HMnokjMJ467gb/yPHuiZd9JkpEJIpKaNVOHGEXoVUhgYcvi0VRfcDF6DvLbcsofAaGk+RgJ1QS88g==",
|
"dgSpecHash": "mGa9tDDFRUOusXoPWWLr4XCXFnrqDuCrQXKR/vGtUL0aS5XFs9SLiy+P64zhT/3OhNhmuOjLHXeh3rpeLW9IUw==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "C:\\Home\\Cours\\Projet\\MVVM\\my\\MVVM\\LibraryDTO\\LibraryDTO.csproj",
|
"projectFilePath": "E:\\Home\\Projet\\MVVM\\MVVM\\LibraryDTO\\LibraryDTO.csproj",
|
||||||
"expectedPackageFiles": [],
|
"expectedPackageFiles": [],
|
||||||
"logs": []
|
"logs": []
|
||||||
}
|
}
|
@ -1,55 +0,0 @@
|
|||||||
using MVVM.Classe;
|
|
||||||
|
|
||||||
namespace MVVM.Pages;
|
|
||||||
|
|
||||||
public partial class AuteurListe : ContentPage
|
|
||||||
{
|
|
||||||
public List<Auteur> Auteurs { get; set; } = new List<Auteur>();
|
|
||||||
|
|
||||||
|
|
||||||
public AuteurListe()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
getAuteur();
|
|
||||||
collectionView.ItemsSource = Auteurs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnTextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
SearchBar searchBar = (SearchBar)sender;
|
|
||||||
if ( searchBar.Text.Length < 1 )
|
|
||||||
{
|
|
||||||
collectionView.ItemsSource = Auteurs;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
List<Auteur> findAuteur = new List<Auteur>();
|
|
||||||
foreach( Auteur auteur in Auteurs)
|
|
||||||
{
|
|
||||||
if ( auteur.Name.Contains(searchBar.Text))
|
|
||||||
{
|
|
||||||
findAuteur.Add(auteur);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
collectionView.ItemsSource = findAuteur;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnButtonClicked(object sender, EventArgs args)
|
|
||||||
{
|
|
||||||
searchBar.Text = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getAuteur()
|
|
||||||
{
|
|
||||||
Auteurs.Add(new Auteur("Alain Damasio", "2"));
|
|
||||||
Auteurs.Add(new Auteur("Cixin Liu", "3"));
|
|
||||||
Auteurs.Add(new Auteur("Daniel Pennac", "2"));
|
|
||||||
Auteurs.Add(new Auteur("Evhenji Ivanovic Zamâtin", "1"));
|
|
||||||
Auteurs.Add(new Auteur("Frank Herbet", "6"));
|
|
||||||
Auteurs.Add(new Auteur("Herbet George Wells", "3"));
|
|
||||||
Auteurs.Add(new Auteur("James S.A. Corey", "6"));
|
|
||||||
Auteurs.Add(new Auteur("James Tynion", "1"));
|
|
||||||
Auteurs.Add(new Auteur("James Tynion (IV)", "1"));
|
|
||||||
Auteurs.Add(new Auteur("Ken Kesey", "1"));
|
|
||||||
Auteurs.Add(new Auteur("Ken Liu", "1"));
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,32 @@
|
|||||||
|
namespace MVVM.Pages.Component;
|
||||||
|
|
||||||
|
public partial class FilterItemComponent : ContentView
|
||||||
|
{
|
||||||
|
|
||||||
|
public static readonly BindableProperty DataFilterCompProperty = BindableProperty.Create(nameof(DataFilterComp), typeof(string), typeof(FilterItemComponent), string.Empty);
|
||||||
|
public static readonly BindableProperty NumberBooksCompProperty = BindableProperty.Create(nameof(NumberBooksComp), typeof(string), typeof(FilterItemComponent), string.Empty);
|
||||||
|
|
||||||
|
|
||||||
|
public string DataFilterComp
|
||||||
|
{
|
||||||
|
get => (string)GetValue(FilterItemComponent.DataFilterCompProperty);
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Console.WriteLine(value);
|
||||||
|
SetValue(FilterItemComponent.DataFilterCompProperty, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string NumberBooksComp
|
||||||
|
{
|
||||||
|
get => (string)GetValue(FilterItemComponent.NumberBooksCompProperty);
|
||||||
|
set => SetValue(FilterItemComponent.NumberBooksCompProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public FilterItemComponent()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
DataFilterXAML.SetBinding(Label.TextProperty, new Binding(nameof(DataFilterComp), source: this));
|
||||||
|
NumberBooksXAML.SetBinding(Label.TextProperty, new Binding(nameof(NumberBooksComp), source: this));
|
||||||
|
}
|
||||||
|
}
|
@ -1,27 +0,0 @@
|
|||||||
namespace MVVM.Pages.Component;
|
|
||||||
|
|
||||||
public partial class AuteurListComponent : ContentView
|
|
||||||
{
|
|
||||||
public static readonly BindableProperty AuteurCompProperty = BindableProperty.Create(nameof(AuteurComp), typeof(string), typeof(AuteurListComponent), string.Empty);
|
|
||||||
public static readonly BindableProperty NbLivreCompProperty = BindableProperty.Create(nameof(NbLivreComp), typeof(string), typeof(AuteurListComponent), string.Empty);
|
|
||||||
|
|
||||||
|
|
||||||
public string AuteurComp
|
|
||||||
{
|
|
||||||
get => (string)GetValue(AuteurListComponent.AuteurCompProperty);
|
|
||||||
set => SetValue(AuteurListComponent.AuteurCompProperty, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string NbLivreComp
|
|
||||||
{
|
|
||||||
get => (string)GetValue(AuteurListComponent.NbLivreCompProperty);
|
|
||||||
set => SetValue(AuteurListComponent.NbLivreCompProperty, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AuteurListComponent()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
Auteur.SetBinding(Label.TextProperty, new Binding(nameof(AuteurComp), source: this));
|
|
||||||
NbLivre.SetBinding(Label.TextProperty, new Binding(nameof(NbLivreComp),source: this));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="MVVM.Pages.DateListe"
|
|
||||||
xmlns:local="clr-namespace:MVVM.Pages.Component">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Shell.TitleView>
|
|
||||||
<Label Text="Date de publication" FontFamily="Strande2" VerticalTextAlignment="Center" VerticalOptions="CenterAndExpand" HeightRequest="50" FontSize="Medium" FontAttributes="Bold"/>
|
|
||||||
</Shell.TitleView>
|
|
||||||
|
|
||||||
<ContentPage.ToolbarItems>
|
|
||||||
<ToolbarItem IconImageSource="arrowuparrowdown" />
|
|
||||||
</ContentPage.ToolbarItems>
|
|
||||||
|
|
||||||
<ScrollView>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Line X1="0" X2="500" />
|
|
||||||
<Grid ColumnDefinitions="*,Auto">
|
|
||||||
<SearchBar Grid.Column="0" x:Name="searchBar" Placeholder="Rechercher" TextChanged="OnTextChanged" HeightRequest="70" />
|
|
||||||
<Button Grid.Column="1" Text="Annuler" TextColor="Gray" Clicked="OnButtonClicked" BackgroundColor="White"/>
|
|
||||||
</Grid>
|
|
||||||
<Line X1="0" X2="500" />
|
|
||||||
</VerticalStackLayout>
|
|
||||||
|
|
||||||
<CollectionView x:Name="collectionView">
|
|
||||||
<CollectionView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<local:AuteurListComponent AuteurComp="{Binding date}" NbLivreComp="{Binding NbLivre}"/>
|
|
||||||
<Line X1="20" X2="500" />
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</DataTemplate>
|
|
||||||
</CollectionView.ItemTemplate>
|
|
||||||
</CollectionView>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentPage>
|
|
@ -1,54 +0,0 @@
|
|||||||
namespace MVVM.Pages;
|
|
||||||
using MVVM.Classe;
|
|
||||||
|
|
||||||
public partial class DateListe : ContentPage
|
|
||||||
{
|
|
||||||
List<Date> dates = new List<Date>();
|
|
||||||
|
|
||||||
public DateListe()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
getDate();
|
|
||||||
collectionView.ItemsSource = dates;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnTextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
SearchBar searchBar = (SearchBar)sender;
|
|
||||||
if (searchBar.Text.Length < 1)
|
|
||||||
{
|
|
||||||
collectionView.ItemsSource = dates;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
List<Date> findDate = new List<Date>();
|
|
||||||
foreach (Date date in dates)
|
|
||||||
{
|
|
||||||
if (date.date.Contains(searchBar.Text))
|
|
||||||
{
|
|
||||||
findDate.Add(date);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
collectionView.ItemsSource = findDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnButtonClicked(object sender, EventArgs args)
|
|
||||||
{
|
|
||||||
searchBar.Text = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getDate()
|
|
||||||
{
|
|
||||||
dates.Add(new Date("2022", "1"));
|
|
||||||
dates.Add(new Date("2021", "6"));
|
|
||||||
dates.Add(new Date("2020", "6"));
|
|
||||||
dates.Add(new Date("2019", "3"));
|
|
||||||
dates.Add(new Date("2018", "2"));
|
|
||||||
dates.Add(new Date("2016", "4"));
|
|
||||||
dates.Add(new Date("2015", "4"));
|
|
||||||
dates.Add(new Date("2012", "1"));
|
|
||||||
dates.Add(new Date("2010", "1"));
|
|
||||||
dates.Add(new Date("2004", "1"));
|
|
||||||
dates.Add(new Date("1997", "1"));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.Maui.Controls;
|
||||||
|
using Wrapper;
|
||||||
|
|
||||||
|
namespace MVVM.Pages;
|
||||||
|
|
||||||
|
public partial class FilterPage : ContentPage
|
||||||
|
{
|
||||||
|
public FilterBookViewModel FilterBookViewModel { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public FilterPage(FilterBookViewModel filterBookViewModel)
|
||||||
|
{
|
||||||
|
|
||||||
|
this.FilterBookViewModel = filterBookViewModel;
|
||||||
|
|
||||||
|
BindingContext = this;
|
||||||
|
|
||||||
|
InitializeComponent();
|
||||||
|
collectionView.ItemsSource = FilterBookViewModel.ItemFilters;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue