@ -0,0 +1,72 @@
|
||||
<?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="PocketBook.DatePublic"
|
||||
xmlns:local="clr-namespace:PocketBook"
|
||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
|
||||
<Grid RowDefinitions="auto,auto, *">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start" Padding="5,0,0,0">
|
||||
<StackLayout Orientation="Horizontal" HorizontalOptions="StartAndExpand">
|
||||
<StackLayout.GestureRecognizers>
|
||||
<TapGestureRecognizer Tapped="RetourMainMenu"/>
|
||||
</StackLayout.GestureRecognizers>
|
||||
<Image Source="chevron_left.png">
|
||||
<Image.Behaviors>
|
||||
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
||||
</Image.Behaviors>
|
||||
</Image>
|
||||
</StackLayout>
|
||||
<Label Text="Date de publication" FontAttributes="Bold" FontSize="18" VerticalTextAlignment="Center" HorizontalOptions="Center"/>
|
||||
<ImageButton x:Name="imageArrows" WidthRequest="25" HeightRequest="25" HorizontalOptions="EndAndExpand" Scale="0.6" Source="arrows.png">
|
||||
<ImageButton.Behaviors>
|
||||
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
||||
</ImageButton.Behaviors>
|
||||
</ImageButton>
|
||||
</StackLayout>
|
||||
<Line BackgroundColor="#E6E6E6"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
|
||||
<SearchBar VerticalOptions="Start" Grid.Row="1" x:Name="searchBar"
|
||||
Placeholder="Rechercher"
|
||||
FontSize="16"
|
||||
BackgroundColor="White"
|
||||
CancelButtonColor="Grey"
|
||||
PlaceholderColor="#C7C7CC"/>
|
||||
|
||||
<ScrollView Grid.Row="2">
|
||||
<StackLayout>
|
||||
<local:Filtrage Dataname="2022" Margin="0,0,0,5" NumberData="1"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2021" Margin="0,0,0,5" NumberData="6"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2020" Margin="0,0,0,5" NumberData="6"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2019" Margin="0,0,0,5" NumberData="3"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2018" Margin="0,0,0,5" NumberData="2"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2016" Margin="0,0,0,5" NumberData="4"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2015" Margin="0,0,0,5" NumberData="4"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2012" Margin="0,0,0,5" NumberData="1"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2010" Margin="0,0,0,5" NumberData="1"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="2004" Margin="0,0,0,5" NumberData="1"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
<local:Filtrage Dataname="1997" Margin="0,0,0,5" NumberData="1"/>
|
||||
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
|
||||
</ScrollView>
|
||||
</Grid>
|
||||
|
||||
|
||||
</ContentPage>
|
||||
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="PocketBook.Filtrage"
|
||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
|
||||
<StackLayout Margin="15,10,0,0" VerticalOptions="Start" Orientation="Horizontal">
|
||||
<Image Source="book.png" WidthRequest="30">
|
||||
<Image.Behaviors>
|
||||
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
||||
</Image.Behaviors>
|
||||
|
||||
</Image>
|
||||
<Label VerticalOptions="Center" HorizontalOptions="StartAndExpand" Margin="15,0,0,0" x:Name="dataname"/>
|
||||
<Label x:Name="numberData" VerticalTextAlignment="Center" TextColor="#AFAFAF" FontSize="16"/>
|
||||
<Image Source="chevron_right.png" Scale="0.5" HorizontalOptions="End" Margin="0,0,5,0"/>
|
||||
</StackLayout>
|
||||
</ContentView>
|
||||
|
@ -1,32 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 286 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 560 B |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 917 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 934 B After Width: | Height: | Size: 934 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 921 B After Width: | Height: | Size: 921 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@ -1,68 +1,28 @@
|
||||
using CommunityToolkit.Maui.Core;
|
||||
using CommunityToolkit.Maui.Views;
|
||||
|
||||
namespace PocketBook;
|
||||
|
||||
public partial class Book
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string type { get; set; }
|
||||
public string auteur { get; set; }
|
||||
public string image { get; set; }
|
||||
|
||||
public Book(string name, string type,string auteur)
|
||||
{
|
||||
this.name = name;
|
||||
this.auteur = auteur;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Auteur
|
||||
{
|
||||
public string name { get; set; }
|
||||
public List<Book> books { get; set; }
|
||||
|
||||
public Auteur(string name)
|
||||
{
|
||||
this.name = name;
|
||||
books = new List<Book>
|
||||
{
|
||||
new Book("Buveur d'encre", "En lecture", name),
|
||||
new Book("Harry Potter et la pierre philosophale", "Non lu",name),
|
||||
new Book("Le Seigneur des anneaux", "En lecture", name),
|
||||
new Book("1984", "Terminé", name),
|
||||
new Book("Le Petit Prince", "Non lu", name)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public partial class TousPage : ContentPage
|
||||
{
|
||||
public List<Auteur> mesAuteurs { get; set; }
|
||||
public List<Book> books { get; set; }
|
||||
|
||||
public bool clicked=false;
|
||||
|
||||
public TousPage()
|
||||
{
|
||||
|
||||
public TousPage()
|
||||
{
|
||||
mesAuteurs = new List<Auteur>
|
||||
{
|
||||
new Auteur("J.K. Rowling"),
|
||||
new Auteur("J.R.R. Tolkien")
|
||||
};
|
||||
InitializeComponent();
|
||||
BindingContext=this;
|
||||
InitializeComponent();
|
||||
}
|
||||
public async void OnCollectionViewSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
||||
public async void OnBookSelected(object sender, EventArgs e)
|
||||
{
|
||||
if (e.CurrentSelection.FirstOrDefault() is Book livreSelectionne)
|
||||
{
|
||||
await Navigation.PushAsync(new BookDetail(livreSelectionne));
|
||||
}
|
||||
await Navigation.PushAsync(new BookDetail());
|
||||
}
|
||||
|
||||
private void OnImageButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
var popup = new AddBook();
|
||||
{
|
||||
this.ShowPopup(new AddBook());
|
||||
}
|
||||
|
||||
private async void RetourMainMenu(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopToRootAsync();
|
||||
}
|
||||
}
|