diff --git a/src/BookApp/BookApp.csproj b/src/BookApp/BookApp.csproj index 1454c6a..bce1c9e 100644 --- a/src/BookApp/BookApp.csproj +++ b/src/BookApp/BookApp.csproj @@ -87,6 +87,9 @@ MSBuild:Compile + + MSBuild:Compile + diff --git a/src/BookApp/Data/Stub.cs b/src/BookApp/Data/Stub.cs index 6a19b91..c99162f 100644 --- a/src/BookApp/Data/Stub.cs +++ b/src/BookApp/Data/Stub.cs @@ -5,15 +5,41 @@ namespace BookApp.Data { public class Stub { - public Book CreateBook(string name, string image, string auteur, bool read, int rating) + public Book CreateBook( + string name, + string image, + Auteur auteur, + StatutDeLecture statut, + int rating, + bool favori = false, + bool next = false, + bool pret = false, + string maisonEdit = "", + string resumer = "", + int nbPage = 0, + string langue = "", + string isbn = "", + string dateAjout = "", + string link = "" + ) { Book book = new Book { Name = name, ImageBook = image, Auteur = auteur, + Statut = statut, Note = new Star(rating), - Read = read + Favori = favori, + Next = next, + Pret = pret, + MaisonEdit = maisonEdit, + Resumer = resumer, + NbPage = nbPage, + Langue = langue, + ISBN = isbn, + dateAjout = dateAjout, + Link = link }; return book; @@ -25,37 +51,37 @@ namespace BookApp.Data { CreateBook( "La horde du contrevent", - "./Reources/Images/dotnet_bot.svg", - "Alain Damasio", - false, + "./Resources/Images/dotnet_bot.svg", + new Auteur { Id = 1, Name = "Alain Damasio" }, + StatutDeLecture.Non_Lu, 4 ), CreateBook( "La zone du dehors", - "./Reources/Images/dotnet_bot.svg", - "Alain Damasio", - true, + "./Resources/Images/dotnet_bot.svg", + new Auteur { Id = 2, Name = "Alain Damasio" }, + StatutDeLecture.Lu, 5 ), CreateBook( "L'équateur d'Einstein", - "./Reources/Images/dotnet_bot.svg", - "Cixin Liu", - true, + "./Resources/Images/dotnet_bot.svg", + new Auteur { Id = 3, Name = "Cixin Liu" }, + StatutDeLecture.Lu, 3 ), CreateBook( "La forêt Sombe", - "./Reources/Images/dotnet_bot.svg", - "Cixin Liu", - true, + "./Resources/Images/dotnet_bot.svg", + new Auteur { Id = 4, Name = "Cixin Liu" }, + StatutDeLecture.Lu, 4 ), CreateBook( "Le problème à trois corps", - "./Reources/Images/dotnet_bot.svg", - "Cixin Liu", - true, + "./Resources/Images/dotnet_bot.svg", + new Auteur { Id = 5, Name = "Cixin Liu" }, + StatutDeLecture.Lu, 5 ) }; diff --git a/src/BookApp/Model/Auteur.cs b/src/BookApp/Model/Auteur.cs new file mode 100644 index 0000000..19085bb --- /dev/null +++ b/src/BookApp/Model/Auteur.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BookApp.Model +{ + public class Auteur + { + public int Id { get; set; } + public string Name { get; set; } + + public Auteur() { } + } +} diff --git a/src/BookApp/Model/Book.cs b/src/BookApp/Model/Book.cs index a4a8c01..72b2666 100644 --- a/src/BookApp/Model/Book.cs +++ b/src/BookApp/Model/Book.cs @@ -11,8 +11,19 @@ namespace BookApp.Model { public string Name { get; set; } public string ImageBook { get; set; } - public string Auteur { get; set; } + public Auteur Auteur { get; set; } public Star Note { get; set; } - public bool Read { get; set; } + public StatutDeLecture Statut { get; set; } + public bool Favori { get; set; } + public bool Next { get; set; } + public bool Pret { get; set; } + public string MaisonEdit { get; set; } + public string Resumer { get; set; } + public int NbPage { get; set; } + public string Langue { get; set; } + public string ISBN { get; set; } + public string dateAjout { get; set; } + + public string Link { get; set; } } } diff --git a/src/BookApp/Model/Person.cs b/src/BookApp/Model/Person.cs new file mode 100644 index 0000000..d698756 --- /dev/null +++ b/src/BookApp/Model/Person.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BookApp.Model +{ + public class Person + { + public int Id { get; set; } + public string Name { get; set; } + } +} diff --git a/src/BookApp/Model/Status.cs b/src/BookApp/Model/Status.cs new file mode 100644 index 0000000..1d34df7 --- /dev/null +++ b/src/BookApp/Model/Status.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BookApp.Model +{ + public enum StatutDeLecture + { + Lu, + A_Lire, + Non_Lu + } +} diff --git a/src/BookApp/Pages/Filtrage.xaml b/src/BookApp/Pages/Filtrage.xaml new file mode 100644 index 0000000..38b1902 --- /dev/null +++ b/src/BookApp/Pages/Filtrage.xaml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/src/BookApp/Pages/Filtrage.xaml.cs b/src/BookApp/Pages/Filtrage.xaml.cs new file mode 100644 index 0000000..c72e6ce --- /dev/null +++ b/src/BookApp/Pages/Filtrage.xaml.cs @@ -0,0 +1,9 @@ +namespace BookApp.Pages; + +public partial class Filtrage : ContentPage +{ + public Filtrage() + { + InitializeComponent(); + } +} diff --git a/src/BookApp/Pages/Tous.xaml b/src/BookApp/Pages/Tous.xaml index 9abbb0a..dad0dc2 100644 --- a/src/BookApp/Pages/Tous.xaml +++ b/src/BookApp/Pages/Tous.xaml @@ -44,7 +44,7 @@ -