diff --git a/MangaMap/MangaMap.csproj b/MangaMap/MangaMap.csproj
index 47f3e18..9e01e40 100644
--- a/MangaMap/MangaMap.csproj
+++ b/MangaMap/MangaMap.csproj
@@ -32,7 +32,7 @@
-
+
@@ -58,12 +58,17 @@
+
+
+
+
+
diff --git a/MangaMap/Model/Manager.cs b/MangaMap/Model/Manager.cs
index cdfd6e1..1dc29c7 100644
--- a/MangaMap/Model/Manager.cs
+++ b/MangaMap/Model/Manager.cs
@@ -1,18 +1,42 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Linq;
+using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
+using MangaMap.DataBinding;
using MangaMap.Stub;
namespace MangaMap.Model
{
- public class Manager
+ public class Manager : System.ComponentModel.INotifyPropertyChanged
{
+
+
public IPersistanceManager Persistance { get; set; }
public List Admins { get; private set; }
public List Utilisateurs { get; private set; }
- public List Oeuvres { get; private set; }
+
+ private ObservableCollection oeuvres;
+
+ public ObservableCollection Oeuvres
+ {
+ get
+ {
+ return oeuvres;
+ }
+ set
+ {
+ oeuvres = value;
+ OnPropertyChanged();
+ }
+ }
+ public event PropertyChangedEventHandler? PropertyChanged;
+
+ void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
public Utilisateur UtilisateurActuel { get; set; }
public bool isAdmin { get; set; }
@@ -20,7 +44,7 @@ namespace MangaMap.Model
public Manager(IPersistanceManager Pers) {
Admins = new List();
Utilisateurs = new List();
- Oeuvres = new List();
+ Oeuvres = new ObservableCollection();
UtilisateurActuel = new Utilisateur();
isAdmin = false;
@@ -31,7 +55,7 @@ namespace MangaMap.Model
{
Admins = new List();
Utilisateurs = new List();
- Oeuvres = new List();
+ Oeuvres = new ObservableCollection();
UtilisateurActuel = new Utilisateur();
isAdmin = false;
}
diff --git a/MangaMap/Resources/AppIcon/logo.png b/MangaMap/Resources/AppIcon/logo.png
new file mode 100644
index 0000000..fbd1cbc
Binary files /dev/null and b/MangaMap/Resources/AppIcon/logo.png differ
diff --git a/MangaMap/Stub/DataContract.cs b/MangaMap/Stub/DataContract.cs
index d19f31c..8a2dffb 100644
--- a/MangaMap/Stub/DataContract.cs
+++ b/MangaMap/Stub/DataContract.cs
@@ -1,6 +1,7 @@
using MangaMap.Model;
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
@@ -16,7 +17,7 @@ namespace MangaMap.Stub
public string FileName { get; set; } = "SauvegardeDonnees.xml";
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
- public (List, List) chargeDonne()
+ public (ObservableCollection, List) chargeDonne()
{
var serializer = new DataContractSerializer(typeof(DataToPersist));
DataToPersist data;
@@ -36,7 +37,7 @@ namespace MangaMap.Stub
return (data.Oeuvres, data.Utilisateurs);
}
- public void sauvegarder(List o, List u)
+ public void sauvegarder(ObservableCollection o, List u)
{
var serializer = new DataContractSerializer(typeof(DataToPersist));
diff --git a/MangaMap/Stub/DataToPersist.cs b/MangaMap/Stub/DataToPersist.cs
index ef26f80..f4bf779 100644
--- a/MangaMap/Stub/DataToPersist.cs
+++ b/MangaMap/Stub/DataToPersist.cs
@@ -4,13 +4,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-
+using System.Collections.ObjectModel;
+
namespace MangaMap.Stub
{
//Cette classe permet de définir ce qui doit être enregistrer par la persistance.
public class DataToPersist
{
- public List Oeuvres { get; set; } = new List();
+ public ObservableCollection Oeuvres { get; set; } = new ObservableCollection();
public List Utilisateurs { get; set; } = new List();
}
diff --git a/MangaMap/Stub/IPersistanceManager.cs b/MangaMap/Stub/IPersistanceManager.cs
index d12d753..af0689d 100644
--- a/MangaMap/Stub/IPersistanceManager.cs
+++ b/MangaMap/Stub/IPersistanceManager.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -9,8 +10,8 @@ namespace MangaMap.Stub
{
public interface IPersistanceManager
{
- (List, List) chargeDonne();
+ (ObservableCollection, List) chargeDonne();
- void sauvegarder(List o, List u);
+ void sauvegarder(ObservableCollection o, List u);
}
}
diff --git a/MangaMap/Stub/Stub.cs b/MangaMap/Stub/Stub.cs
index b0a5129..a83dada 100644
--- a/MangaMap/Stub/Stub.cs
+++ b/MangaMap/Stub/Stub.cs
@@ -1,6 +1,7 @@
using MangaMap.Model;
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -12,9 +13,9 @@ namespace MangaMap.Stub
//Cette classe sert à faire charger un jeu de données qui n'est pas celui enregistrer dans le fichier sur l'ordinateur.
//Il permet de faire des transistion entre différent moyen de persister.
{
- public (List, List) chargeDonne()
+ public (ObservableCollection, List) chargeDonne()
{
- List l1 = new List();
+ ObservableCollection l1 = new ObservableCollection();
List l2 = new List();
Utilisateur u1 = new Utilisateur("t", "Pseudo1", "t", "Jean", "Baptiste", 12);
@@ -34,7 +35,7 @@ namespace MangaMap.Stub
return (l1, l2);
}
- public void sauvegarder(List o, List u)
+ public void sauvegarder(ObservableCollection o, List u)
{
throw new NotImplementedException();
}
diff --git a/MangaMap/Views/Composants/ListOeuvre.xaml b/MangaMap/Views/Composants/ListOeuvre.xaml
index 56041c8..b0d7909 100644
--- a/MangaMap/Views/Composants/ListOeuvre.xaml
+++ b/MangaMap/Views/Composants/ListOeuvre.xaml
@@ -73,7 +73,7 @@
-
+
@@ -112,7 +112,7 @@
-
+
@@ -151,7 +151,7 @@
-
+
diff --git a/MangaMap/Views/FicheAnime.xaml.cs b/MangaMap/Views/FicheAnime.xaml.cs
index 2adcb56..39ff225 100644
--- a/MangaMap/Views/FicheAnime.xaml.cs
+++ b/MangaMap/Views/FicheAnime.xaml.cs
@@ -6,6 +6,7 @@ using System.Diagnostics;
using System.Drawing;
using System.Windows.Input;
using System.Xml.Linq;
+using Microsoft.Maui.Graphics;
public partial class ficheAnime : ContentPage, INotifyPropertyChanged
@@ -91,6 +92,7 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged
ImageButton imageButton = new ImageButton
{
Source = "star_full.png",
+ BackgroundColor = Microsoft.Maui.Graphics.Color.FromHex("1E1E1E"),
WidthRequest = 50,
HeightRequest = 50,
AutomationId = i.ToString(),
@@ -108,6 +110,7 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged
ImageButton imageButton = new ImageButton
{
Source = "star_empty.png",
+ BackgroundColor = Microsoft.Maui.Graphics.Color.FromHex("1E1E1E"),
WidthRequest = 50,
HeightRequest = 50,
AutomationId = i.ToString(),
diff --git a/MangaMap/Views/homePage.xaml b/MangaMap/Views/homePage.xaml
index ab9de2e..0f13b6a 100644
--- a/MangaMap/Views/homePage.xaml
+++ b/MangaMap/Views/homePage.xaml
@@ -11,21 +11,22 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+