diff --git a/MangaMap/Model/Manager.cs b/MangaMap/Model/Manager.cs index ec68176..614fe62 100644 --- a/MangaMap/Model/Manager.cs +++ b/MangaMap/Model/Manager.cs @@ -1,19 +1,41 @@ 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 event PropertyChangedEventHandler? PropertyChanged; + + void OnPropertyChanged([CallerMemberName] string propertyName = null) + => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + public IPersistanceManager Persistance { get; set; } public List Admins { get; private set; } public List Utilisateurs { get; private set; } - public ObservableCollection Oeuvres { get; private set; } + + private ObservableCollection oeuvres; + + public ObservableCollection Oeuvres + { + get + { + return oeuvres; + } + set + { + oeuvres = value; + OnPropertyChanged(); + } + } public Utilisateur UtilisateurActuel { get; set; } public bool isAdmin { get; set; } diff --git a/MangaMap/Views/homePage.xaml b/MangaMap/Views/homePage.xaml index ab9de2e..b97f4b1 100644 --- a/MangaMap/Views/homePage.xaml +++ b/MangaMap/Views/homePage.xaml @@ -20,12 +20,13 @@ - - + @@ -62,6 +63,8 @@ + +