Rectification de certains problèmes et mise en place de la page Date de publication et auteur

master
Lucas Evard 2 years ago
parent 23c7e44322
commit 8a14c4a337

BIN
sources/.DS_Store vendored

Binary file not shown.

Binary file not shown.

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="PocketBook.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
@ -8,10 +8,10 @@
Shell.NavBarIsVisible="False">
<TabBar>
<ShellContent Title="My Library" Icon="books_vertical_fill.svg" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="My Lists" Icon="listbullet.svg" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="My Readings" Icon="bookmark.svg" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="Search" Icon="magnifyingglass.svg" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="My Library" Icon="books_vertical_fill.png" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="My Lists" Icon="listbullet.png" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="My Readings" Icon="bookmark_fill.png" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Title="Search" Icon="magnifyingglass.png" ContentTemplate="{DataTemplate local:MainPage}"/>
</TabBar>
</Shell>

@ -1,14 +1,69 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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.Auteur"
Title="Auteur">
<ScrollView>
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
Title="Auteur"
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>
<Label VerticalTextAlignment="Center" Text="Mes livres" FontAttributes="Bold" TextColor="{StaticResource Primary}" FontSize="15" Margin="5,0,0,0"/>
</StackLayout>
<Label Text="Auteur" FontAttributes="Bold" FontSize="18" VerticalTextAlignment="Center" HorizontalOptions="CenterAndExpand"/>
<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="Alain Damasio" Margin="0,0,0,5" NumberData="2"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Cixin Lui" Margin="0,0,0,5" NumberData="3"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Daniel Pennac" Margin="0,0,0,5" NumberData="2"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Evgenij Ivanovic Zamâtin" Margin="0,0,0,5" NumberData="1"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Frank Herbert" Margin="0,0,0,5" NumberData="6"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Herbert George Wells" Margin="0,0,0,5" NumberData="3"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="James S. A. Corey" Margin="0,0,0,5" NumberData="6"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="James Tynion" Margin="0,0,0,5" NumberData="1"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="James Tynion (IV)" Margin="0,0,0,5" NumberData="1"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Ken Kesey" Margin="0,0,0,5" NumberData="1"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
<local:Filtrage Dataname="Ken Liu" Margin="0,0,0,5" NumberData="1"/>
<Line BackgroundColor="#E6E6E6" Margin="60,0,0,0"/>
</StackLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -6,4 +6,9 @@ public partial class Auteur : ContentPage
{
InitializeComponent();
}
private async void RetourMainMenu(object sender, EventArgs e)
{
await Navigation.PopToRootAsync();
}
}

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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.BookChange"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
<StackLayout Orientation="Horizontal" Margin="10,15,0,15">
<Image x:Name="imageName" WidthRequest="30" HeightRequest="30">
<Image x:Name="imageName" WidthRequest="20" HeightRequest="20">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
</Image.Behaviors>

@ -1,19 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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.BookDetail"
xmlns:local="clr-namespace:PocketBook"
Title="BookDetail">
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
<Grid RowDefinitions="auto, *">
<!-- StackLayout Orientation="Vertical">
<StackLayout Orientation="Vertical">
<StackLayout Grid.Row="0" Orientation="Horizontal" BackgroundColor="#F2F1F6" Padding="0,10,60,20">
<Image Source="chevron_left.svg" HorizontalOptions="Start"/>
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Tapped="RetourMainMenu"/>
</StackLayout.GestureRecognizers>
<Image Source="chevron_left.png" Margin="5,0,0,0" HorizontalOptions="Start">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
</Image.Behaviors>
</Image>
<Label VerticalTextAlignment="Center" Text="Tous" FontAttributes="Bold" TextColor="{StaticResource Primary}" FontSize="15" Margin="5,0,0,0"/>
<Label Text="Détails du livre" FontAttributes="Bold" FontSize="18" VerticalTextAlignment="Center" HorizontalOptions="CenterAndExpand"/>
</StackLayout>
<Line BackgroundColor="#E6E6E6"/>
</StackLayout> -->
<ScrollView>
<Line BackgroundColor="#E6E6E6"/>
</StackLayout>
<ScrollView Grid.Row="1">
<StackLayout>
<StackLayout Orientation="Horizontal" Margin="15,0,0,20">
@ -29,7 +42,7 @@
<Line BackgroundColor="#D0D0D2" />
<StackLayout Orientation="Horizontal">
<Label Text="Infos en ligne" FontSize="20" HorizontalOptions="StartAndExpand" Margin="10,10,0,10"/>
<Image Source="chevron_right.svg" HorizontalOptions="Start" Scale="0.6"/>
<Image Source="chevron_right.png" HorizontalOptions="Start" Scale="0.6"/>
</StackLayout>
<Line BackgroundColor="#D0D0D2" />
<StackLayout Margin="10,10,0,10">
@ -49,7 +62,7 @@
Curabitur tempus erat nec sapien aliquam venenatis. In ornare odio in lacus ornare finibus. Maecenas semper nulla non tortor gravida tincidunt ut ut arcu. Sed magna sem, semper quis justo vitae, lacinia laoreet ex. Curabitur at mauris a velit pharetra fringilla commodo non elit. Quisque sollicitudin, ipsum id dapibus consectetur, sapien tortor mattis lectus, vitae tempor nisl nisl sed ipsum. In in orci nec odio hendrerit posuere a vel libero." Margin="0,10,15,0"/>
</StackLayout>
<Line BackgroundColor="#D0D0D2" />
<StackLayout Margin="0,10,0,10">
<StackLayout Margin="0,10,0,0">
<Label Text="Détails" FontSize="14" Margin="10,0,0,5" FontAttributes="Bold"/>
<StackLayout Orientation="Horizontal">
<Label Text="Nombre de pages" TextColor="#9D9D9D" Margin="10,0,0,5" FontSize="18"/>
@ -78,17 +91,18 @@
<Line BackgroundColor="#D0D0D2"/>
<StackLayout Padding="50"/>
<Line BackgroundColor="#D0D0D2"/>
<local:BookChange PropertyName="Déplacer le livre" ImageName="folder.svg"/>
<local:BookChange PropertyName="Déplacer le livre" ImageName="folder.png"/>
<Line BackgroundColor="#D0D0D2"/>
<local:BookChange PropertyName="Ajouter à la liste à lire plus tard" ImageName="plus_round.svg"/>
<local:BookChange PropertyName="Ajouter à la liste à lire plus tard" ImageName="plus_round.png"/>
<Line BackgroundColor="#D0D0D2"/>
<local:BookChange PropertyName="Changer le statut de lecture" ImageName="eyeglasses.svg"/>
<local:BookChange PropertyName="Changer le statut de lecture" ImageName="eyeglasses.png"/>
<Line BackgroundColor="#D0D0D2"/>
<local:BookChange PropertyName="Prêter le livre" ImageName="person.svg"/>
<local:BookChange PropertyName="Prêter le livre" ImageName="person.png"/>
</StackLayout>
</StackLayout>
</StackLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -2,23 +2,21 @@ namespace PocketBook;
public partial class BookDetail : ContentPage
{
public BookDetail(Book book)
public BookDetail()
{
InitializeComponent();
ToolbarItem item = new ToolbarItem
{
Text = "Add item",
IconImageSource = ImageSource.FromFile("add.png")
};
this.ToolbarItems.Add(item);
titreBook.Text = book.name;
bookAuteur.Text = book.auteur;
InitializeComponent();
titreBook.Text = "La horde du contrevent";
bookAuteur.Text = "Alain Damasio";
bookEdition.Text = "Fayard (2019)";
bookNbPages.Text = "700";
bookISBN.Text = "9854645645456";
bookLangue.Text = "français";
bookStatus.Text = book.type;
bookAdd.Text = "15 aoűt 2013";
bookLangue.Text = "français";
bookStatus.Text = "Non lu";
bookAdd.Text = "15 août 2013";
}
private async void RetourMainMenu(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
}

@ -1,23 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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.ContentViewBook">
x:Class="PocketBook.ContentViewBook"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
<VerticalStackLayout Margin="15,0,0,0">
<StackLayout Orientation="Horizontal" Margin="0,5,0,0">
<Image x:Name="bookImage" Margin="0,0,10,0" WidthRequest="75" HeightRequest="110"/>
<StackLayout Orientation="Vertical">
<Label x:Name="bookName" FontAttributes="Bold"/>
<Label x:Name="autorName" FontSize="12"/>
<Label x:Name="bookStatus" FontSize="12" TextColor="#AFAFAF"/>
<StackLayout Orientation="Horizontal" Margin="0,25,0,0">
<Image Source="star.svg" WidthRequest="20"/>
<Image Source="star.svg" WidthRequest="20"/>
<Image Source="star.svg" WidthRequest="20"/>
<Image Source="star.svg" WidthRequest="20"/>
<Image Source="star.svg" WidthRequest="20"/>
<Image x:Name="bookImage" Margin="0,0,10,0" WidthRequest="75" HeightRequest="110"/>
<StackLayout Orientation="Vertical">
<Label x:Name="bookName" FontAttributes="Bold"/>
<Label x:Name="autorName" FontSize="12"/>
<Label x:Name="bookStatus" FontSize="12" TextColor="#AFAFAF"/>
<StackLayout Orientation="Horizontal" Margin="0,30,0,0">
<Image Source="star.png" WidthRequest="20" HeightRequest="20">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="#E6E6E6"/>
</Image.Behaviors>
</Image>
<Image Source="star.png" WidthRequest="20" HeightRequest="20">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="#E6E6E6"/>
</Image.Behaviors>
</Image>
<Image Source="star.png" WidthRequest="20" HeightRequest="20">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="#E6E6E6"/>
</Image.Behaviors>
</Image>
<Image Source="star.png" WidthRequest="20" HeightRequest="20">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="#E6E6E6"/>
</Image.Behaviors>
</Image>
<Image Source="star.png" WidthRequest="20" HeightRequest="20">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="#E6E6E6"/>
</Image.Behaviors>
</Image>
</StackLayout>
</StackLayout>
</StackLayout>
</StackLayout>
<Line BackgroundColor="#E6E6E6"/>
</VerticalStackLayout>
</ContentView>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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.ContentViewFilter">
@ -7,7 +7,7 @@
<Image WidthRequest="20" HeightRequest="20" x:Name="filterImage" Margin="20,0,10,0"/>
<Label x:Name="filterNameLabel" Margin="5,0,0,0" VerticalTextAlignment="Center" HorizontalOptions="StartAndExpand"/>
<Label x:Name="filterNumLabel" VerticalTextAlignment="Center" TextColor="#AFAFAF"/>
<Image Source="chevron_right.svg" Scale="0.5" HorizontalOptions="End" Margin="0,0,5,0"/>
<Image Source="chevron_right.png" Scale="0.5" HorizontalOptions="End" Margin="0,0,5,0"/>
</StackLayout>
</VerticalStackLayout>
</ContentView>

@ -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,14 @@
namespace PocketBook;
public partial class DatePublic : ContentPage
{
public DatePublic()
{
InitializeComponent();
}
private async void RetourMainMenu(object sender, EventArgs e)
{
await Navigation.PopToRootAsync();
}
}

@ -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>

@ -0,0 +1,33 @@
namespace PocketBook;
public partial class Filtrage : ContentView
{
public static readonly BindableProperty DatanameProperty =
BindableProperty.Create(nameof(Dataname), typeof(string), typeof(Filtrage), string.Empty);
public static readonly BindableProperty NumberDataProperty =
BindableProperty.Create(nameof(NumberData), typeof(string), typeof(Filtrage), string.Empty);
public string Dataname
{
get { return (string)GetValue(DatanameProperty); }
set { SetValue(DatanameProperty, value); }
}
public string NumberData
{
get { return (string)GetValue(NumberDataProperty); }
set { SetValue(NumberDataProperty, value); }
}
public Filtrage()
{
InitializeComponent();
dataname.SetBinding(Label.TextProperty, new Binding(nameof(Dataname), source: this));
numberData.SetBinding(Label.TextProperty, new Binding(nameof(NumberData), source: this));
}
}

@ -13,7 +13,7 @@
<Label Padding="15,0,0,0" Text="Mes Livres" FontSize="38" FontAttributes="Bold" Margin="0,0,0,10"/>
<Line BackgroundColor="#E6E6E6"/>
<StackLayout Background="#F8F8F8">
<local:ContentViewFilter FilterImageName="tray_second_fill.svg"
<local:ContentViewFilter FilterImageName="tray_second_fill.png"
FilterName="Tous"
FilterNum="45">
<local:ContentViewFilter.GestureRecognizers>
@ -21,17 +21,17 @@
</local:ContentViewFilter.GestureRecognizers>
</local:ContentViewFilter>
<Line BackgroundColor="#E6E6E6" Margin="25,0,0,0"/>
<local:ContentViewFilter FilterImageName="person_badge_clock_fill.svg"
<local:ContentViewFilter FilterImageName="person_badge_clock_fill.png"
FilterName="En prêt"
FilterNum="1"/>
<Line BackgroundColor="#E6E6E6" Margin="25,0,0,0"/>
<local:ContentViewFilter FilterImageName="arrow_forward.svg"
<local:ContentViewFilter FilterImageName="arrow_forward.png"
FilterName="A lire plus tard"/>
<Line BackgroundColor="#E6E6E6" Margin="25,0,0,0"/>
<local:ContentViewFilter FilterImageName="eyeglasses.svg"
<local:ContentViewFilter FilterImageName="eyeglasses.png"
FilterName="Statut de lecture"/>
<Line BackgroundColor="#E6E6E6" Margin="25,0,0,0"/>
<local:ContentViewFilter FilterImageName="heart_fill.svg"
<local:ContentViewFilter FilterImageName="heart_fill.png"
FilterName="Favoris"/>
</StackLayout>
<Line BackgroundColor="#E6E6E6"/>
@ -39,21 +39,28 @@
<Line BackgroundColor="#E6E6E6"/>
<StackLayout Background="#F8F8F8">
<local:ContentViewFilter FilterImageName="person_fill.svg"
<local:ContentViewFilter FilterImageName="person_fill.png"
FilterName="Auteur">
<local:ContentViewFilter.GestureRecognizers>
<TapGestureRecognizer Tapped="OnContentViewFilterTappedAuteur"/>
</local:ContentViewFilter.GestureRecognizers>
</local:ContentViewFilter>
<Line BackgroundColor="#E6E6E6" Margin="25,0,0,0"/>
<local:ContentViewFilter FilterImageName="calendar.svg"
FilterName="Date de publication"/>
<local:ContentViewFilter FilterImageName="calendar.png"
FilterName="Date de publication">
<local:ContentViewFilter.GestureRecognizers>
<TapGestureRecognizer Tapped="OnContentViewFilterTappedDate"/>
</local:ContentViewFilter.GestureRecognizers>
</local:ContentViewFilter>
<Line BackgroundColor="#E6E6E6" Margin="25,0,0,0"/>
<local:ContentViewFilter FilterImageName="sparkles.svg"
<local:ContentViewFilter FilterImageName="sparkles.png"
FilterName="Note"/>
</StackLayout>
<Line BackgroundColor="#E6E6E6"/>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -14,6 +14,11 @@ public partial class MainPage : ContentPage
private async void OnContentViewFilterTappedAuteur(object sender, EventArgs e)
{
await Navigation.PushAsync(new Auteur());
}
}
private async void OnContentViewFilterTappedDate(object sender,EventArgs e)
{
await Navigation.PushAsync(new DatePublic());
}
}

@ -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>

@ -30,6 +30,12 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
@ -38,10 +44,6 @@
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
@ -80,6 +82,105 @@
</MauiXaml>
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Images\book.svg" />
<None Remove="Resources\Images\arrow_forward.svg" />
<None Remove="Resources\Images\arrows.svg" />
<None Remove="Resources\Images\barcode_scan.png" />
<None Remove="Resources\Images\barcode.svg" />
<None Remove="Resources\Images\binoculars_fill.svg" />
<None Remove="Resources\Images\binoculars.svg" />
<None Remove="Resources\Images\book_closed_fill.svg" />
<None Remove="Resources\Images\book_closed.svg" />
<None Remove="Resources\Images\book_fill.svg" />
<None Remove="Resources\Images\bookmark_fill.svg" />
<None Remove="Resources\Images\bookmark.svg" />
<None Remove="Resources\Images\books_vertical_fill.svg" />
<None Remove="Resources\Images\books_vertical.svg" />
<None Remove="Resources\Images\buveurencre.jpg" />
<None Remove="Resources\Images\caca.svg" />
<None Remove="Resources\Images\calendar_badge_clock.svg" />
<None Remove="Resources\Images\calendar.svg" />
<None Remove="Resources\Images\chevron_left.svg" />
<None Remove="Resources\Images\chevron_right.svg" />
<None Remove="Resources\Images\dotnet_bot.svg" />
<None Remove="Resources\Images\eyeglasses.svg" />
<None Remove="Resources\Images\folder.svg" />
<None Remove="Resources\Images\gear.svg" />
<None Remove="Resources\Images\heart_fill.svg" />
<None Remove="Resources\Images\heart.svg" />
<None Remove="Resources\Images\keyboard.svg" />
<None Remove="Resources\Images\listbullet.svg" />
<None Remove="Resources\Images\magnifyingglass.svg" />
<None Remove="Resources\Images\person_badge_clock_fill.svg" />
<None Remove="Resources\Images\person_badge_clock.svg" />
<None Remove="Resources\Images\person_fill.svg" />
<None Remove="Resources\Images\person_second_fill.svg" />
<None Remove="Resources\Images\person_second.svg" />
<None Remove="Resources\Images\person_three_fill.svg" />
<None Remove="Resources\Images\person_three.svg" />
<None Remove="Resources\Images\person.svg" />
<None Remove="Resources\Images\plus_round.svg" />
<None Remove="Resources\Images\plus.svg" />
<None Remove="Resources\Images\sparkles.svg" />
<None Remove="Resources\Images\star.svg" />
<None Remove="Resources\Images\sunglasses.svg" />
<None Remove="Resources\Images\tag_fill.svg" />
<None Remove="Resources\Images\tag.svg" />
<None Remove="Resources\Images\text_book_closed_fill.svg" />
<None Remove="Resources\Images\text_book_closed.svg" />
<None Remove="Resources\Images\tray_second_fill.svg" />
<None Remove="Resources\Images\tray_second.svg" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\Images\arrow_forward.svg" />
<MauiImage Include="Resources\Images\arrows.svg" />
<MauiImage Include="Resources\Images\barcode_scan.png" />
<MauiImage Include="Resources\Images\barcode.svg" />
<MauiImage Include="Resources\Images\binoculars_fill.svg" />
<MauiImage Include="Resources\Images\binoculars.svg" />
<MauiImage Include="Resources\Images\book_closed_fill.svg" />
<MauiImage Include="Resources\Images\book_closed.svg" />
<MauiImage Include="Resources\Images\book_fill.svg" />
<MauiImage Include="Resources\Images\bookmark_fill.svg" />
<MauiImage Include="Resources\Images\bookmark.svg" />
<MauiImage Include="Resources\Images\books_vertical_fill.svg" />
<MauiImage Include="Resources\Images\books_vertical.svg" />
<MauiImage Include="Resources\Images\buveurencre.jpg" />
<MauiImage Include="Resources\Images\book.svg" />
<MauiImage Include="Resources\Images\calendar_badge_clock.svg" />
<MauiImage Include="Resources\Images\calendar.svg" />
<MauiImage Include="Resources\Images\chevron_left.svg" />
<MauiImage Include="Resources\Images\chevron_right.svg" />
<MauiImage Include="Resources\Images\dotnet_bot.svg" />
<MauiImage Include="Resources\Images\eyeglasses.svg" />
<MauiImage Include="Resources\Images\folder.svg" />
<MauiImage Include="Resources\Images\gear.svg" />
<MauiImage Include="Resources\Images\heart_fill.svg" />
<MauiImage Include="Resources\Images\heart.svg" />
<MauiImage Include="Resources\Images\keyboard.svg" />
<MauiImage Include="Resources\Images\listbullet.svg" />
<MauiImage Include="Resources\Images\magnifyingglass.svg" />
<MauiImage Include="Resources\Images\person_badge_clock_fill.svg" />
<MauiImage Include="Resources\Images\person_badge_clock.svg" />
<MauiImage Include="Resources\Images\person_fill.svg" />
<MauiImage Include="Resources\Images\person_second_fill.svg" />
<MauiImage Include="Resources\Images\person_second.svg" />
<MauiImage Include="Resources\Images\person_three_fill.svg" />
<MauiImage Include="Resources\Images\person_three.svg" />
<MauiImage Include="Resources\Images\person.svg" />
<MauiImage Include="Resources\Images\plus_round.svg" />
<MauiImage Include="Resources\Images\plus.svg" />
<MauiImage Include="Resources\Images\sparkles.svg" />
<MauiImage Include="Resources\Images\star.svg" />
<MauiImage Include="Resources\Images\sunglasses.svg" />
<MauiImage Include="Resources\Images\tag_fill.svg" />
<MauiImage Include="Resources\Images\tag.svg" />
<MauiImage Include="Resources\Images\text_book_closed_fill.svg" />
<MauiImage Include="Resources\Images\text_book_closed.svg" />
<MauiImage Include="Resources\Images\tray_second_fill.svg" />
<MauiImage Include="Resources\Images\tray_second.svg" />
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionPocketBookHideInfoBar="True" /></VisualStudio></ProjectExtensions>
</Project>

Binary file not shown.

Binary file not shown.

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

@ -0,0 +1,10 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2124_88468)">
<path d="M1 22.8164C1 23.7773 1.63281 24.1523 2.32422 24.1523C2.72266 24.1523 3.0625 23.918 3.50781 23.6484C4.79688 22.7695 6.39062 22.2305 8.01953 22.2422C9.70703 22.2539 11.3828 22.875 12.6953 24.1406C13.2109 24.6094 13.5859 24.7617 14.0195 24.7617C14.4414 24.7617 14.8281 24.6094 15.332 24.1406C16.6445 22.8867 18.3203 22.2539 20.0195 22.2422C21.6484 22.2305 23.2305 22.7695 24.5195 23.6484C24.9648 23.918 25.3047 24.1523 25.7148 24.1523C26.3945 24.1523 27.0273 23.7773 27.0273 22.8164V6.91406C27.0273 6.71484 27.0156 6.55078 26.8867 6.35156C25.8438 4.53516 23.1953 3 19.9727 3C17.418 3 15.2031 4.01953 14.0195 5.46094C12.8359 4.01953 10.6094 3 8.06641 3C4.83203 3 2.18359 4.53516 1.14062 6.35156C1.02344 6.55078 1 6.71484 1 6.91406V22.8164ZM2.88672 21.8203V7.18359C3.83594 5.8125 5.89844 4.88672 8.06641 4.88672C10.293 4.88672 12.2383 5.82422 13.0703 7.25391V22.0195C11.875 21.0703 10.0117 20.3555 8.06641 20.3555C6.02734 20.3555 4.12891 20.9297 2.88672 21.8203ZM14.957 22.0195V7.25391C15.7891 5.82422 17.7461 4.88672 19.9727 4.88672C22.1289 4.88672 24.1914 5.8125 25.1406 7.18359V21.8203C23.8984 20.9297 22 20.3555 19.9727 20.3555C18.0156 20.3555 16.1523 21.0703 14.957 22.0195Z" fill="black" fill-opacity="0.85"/>
</g>
<defs>
<clipPath id="clip0_2124_88468">
<rect width="26.0273" height="21.7852" fill="white" transform="translate(1 3)"/>
</clipPath>
</defs>
</svg>

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,81 +1,83 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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"
xmlns:local="clr-namespace:PocketBook"
x:Class="PocketBook.TousPage"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
<ScrollView>
<VerticalStackLayout>
<StackLayout Orientation="Horizontal" Padding="5,0">
<Image Source="chevron_left.svg">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
</Image.Behaviors>
</Image>
<Label VerticalTextAlignment="Center" Text="Mes livres" FontAttributes="Bold" HorizontalOptions="StartAndExpand" TextColor="{StaticResource Primary}" FontSize="15" Margin="5,0,0,0"/>
<Label Text="Tous" FontAttributes="Bold" FontSize="18" VerticalTextAlignment="Center" HorizontalOptions="CenterAndExpand" Margin="0,0,15,0"/>
<StackLayout HorizontalOptions="EndAndExpand" Orientation="Horizontal">
<Label VerticalTextAlignment="Center" Text="+" TextColor="{StaticResource Primary}" FontSize="30" />
<ImageButton Margin="15,0,0,0" x:Name="imageArrows" Clicked="OnImageButtonClicked" WidthRequest="25" HeightRequest="25" Source="arrows.svg">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
</ImageButton.Behaviors>
</ImageButton>
</StackLayout>
<Grid RowDefinitions="auto, *">
<StackLayout Orientation="Vertical">
<StackLayout Orientation="Horizontal" 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>
<Label VerticalTextAlignment="Center" Text="Mes livres" FontAttributes="Bold" TextColor="{StaticResource Primary}" FontSize="15" Margin="5,0,0,0"/>
</StackLayout>
<Label Text="Tous" FontAttributes="Bold" FontSize="18" VerticalTextAlignment="Center" HorizontalOptions="Center" Margin="0,0,10,0"/>
<StackLayout HorizontalOptions="EndAndExpand" Orientation="Horizontal">
<ImageButton VerticalOptions="Center" Clicked="OnImageButtonClicked" HorizontalOptions="StartAndExpand" Source="plus.png" Scale="0.5">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
</ImageButton.Behaviors>
</ImageButton>
<ImageButton x:Name="imageArrows" WidthRequest="25" HeightRequest="25" HorizontalOptions="End" Scale="0.6" Source="arrows.png">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
</ImageButton.Behaviors>
</ImageButton>
</StackLayout>
</StackLayout>
<Line BackgroundColor="#E6E6E6"/>
<CollectionView ItemsSource="{Binding mesAuteurs}">
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout>
<StackLayout BackgroundColor="#F8F8F8" Padding="5">
<Label Text="{Binding name}" TextColor="#AFAFAF" FontAttributes="Bold" Margin="15,0,0,0" />
</StackLayout>
<CollectionView ItemsSource="{Binding books}" SelectionMode="Single" SelectionChanged="OnCollectionViewSelectionChanged">
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup Name="CommonStates">
<VisualState Name="Selected">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="White" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<local:ContentViewBook x:Name="selectedItemBook" BookImage="buveurencre.jpg" AutorName="{Binding auteur}" BookName="{Binding name}" BookStatus="{Binding type}"/>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
<StackLayout Margin="150,300,25,0" BackgroundColor="#AFAFAF">
<StackLayout Orientation="Horizontal">
<Label Text="Ajouter un livre" Margin="15,0,0,0" HorizontalOptions="StartAndExpand" Padding="0,5,0,5"/>
<Image Source="barcode_scan" WidthRequest="20" HorizontalOptions="End" HeightRequest="20"/>
</StackLayout>
<Line BackgroundColor="Red"/>
<StackLayout Orientation="Horizontal">
<Label Text="Scanner un code-barres" HorizontalOptions="StartAndExpand" Margin="15,0,0,0"/>
<Image Source="barcode" WidthRequest="20" HorizontalOptions="End" HeightRequest="20"/>
</StackLayout>
<Line BackgroundColor="Red"/>
<StackLayout Orientation="Horizontal">
<Label Text="Scanner des codes-barres" HorizontalOptions="StartAndExpand" Margin="15,0,0,0"/>
<Image Source="magnifyingglass" WidthRequest="20" HorizontalOptions="End" HeightRequest="20"/>
</StackLayout>
<Line BackgroundColor="Red" StrokeThickness="5"/>
<Label Text="Rechercher en ligne" Margin="15,0,0,0"/>
<Line BackgroundColor="Red"/>
<Label Text="Saisir l'ISBN" Margin="15,0,0,0"/>
</StackLayout>
<ScrollView Grid.Row="1">
<VerticalStackLayout>
<StackLayout BackgroundColor="#F8F8F8" Padding="5">
<Label Text="Alain Damasio" TextColor="#AFAFAF" FontAttributes="Bold" Margin="15,0,0,0" />
</StackLayout>
<local:ContentViewBook BookImage="buveurencre.jpg" BookName="La horde du contrevent" AutorName="Alain Damasio" BookStatus="Non lu">
<local:ContentViewBook.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBookSelected"/>
</local:ContentViewBook.GestureRecognizers>
</local:ContentViewBook>
<Line BackgroundColor="#E6E6E6" Margin="15,0,0,0"/>
<local:ContentViewBook BookImage="buveurencre.jpg" BookName="La zone du dehors" AutorName="Alain Damasio" BookStatus="Terminé">
<local:ContentViewBook.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBookSelected"/>
</local:ContentViewBook.GestureRecognizers>
</local:ContentViewBook>
<StackLayout BackgroundColor="#F8F8F8" Padding="5">
<Label Text="Cixin Liu" TextColor="#AFAFAF" FontAttributes="Bold" Margin="15,0,0,0" />
</StackLayout>
<local:ContentViewBook BookImage="buveurencre.jpg" BookName="L'équateur d'Einstein" AutorName="Cixin Liu" BookStatus="Terminé">
<local:ContentViewBook.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBookSelected"/>
</local:ContentViewBook.GestureRecognizers>
</local:ContentViewBook>
<Line BackgroundColor="#E6E6E6" Margin="15,0,0,0"/>
<local:ContentViewBook BookImage="buveurencre.jpg" BookName="La forêt sombre" AutorName="Cixin Liu" BookStatus="Terminé">
<local:ContentViewBook.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBookSelected"/>
</local:ContentViewBook.GestureRecognizers>
</local:ContentViewBook>
<Line BackgroundColor="#E6E6E6" Margin="15,0,0,0"/>
<local:ContentViewBook BookImage="buveurencre.jpg" BookName="Le problème à trois corps" AutorName="Cixin Liu" BookStatus="Terminé">
<local:ContentViewBook.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBookSelected"/>
</local:ContentViewBook.GestureRecognizers>
</local:ContentViewBook>
</VerticalStackLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -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();
}
}
Loading…
Cancel
Save