diff --git a/GameAtlas/GameAtlas/Models/Manager.cs b/GameAtlas/GameAtlas/Models/Manager.cs index 746f54a..906ef91 100644 --- a/GameAtlas/GameAtlas/Models/Manager.cs +++ b/GameAtlas/GameAtlas/Models/Manager.cs @@ -15,6 +15,39 @@ namespace GameAtlas.Models public List Admins { get; private set; } public List Utilisateurs { get; private set; } + private ObservableCollection topRatedGames; + + public ObservableCollection TopRatedGames + { + get + { + return topRatedGames = new ObservableCollection(ListJeux.OrderByDescending(jeu => jeu.Note).Take(4)); + } + set + { + topRatedGames = value; + OnPropertyChanged(); + } + } + + private ObservableCollection listJeuxAffiches; + public ObservableCollection ListJeuxAffiches + { + get + { + var cinqPremiersJeux = ListJeux.Take(5); + return listJeuxAffiches = new ObservableCollection(cinqPremiersJeux); + } + set + { + listJeuxAffiches = value; + OnPropertyChanged(); + } + } + + + + private ObservableCollection listJeux; public ObservableCollection ListJeux { diff --git a/GameAtlas/GameAtlas/Views/PageAccueil.xaml b/GameAtlas/GameAtlas/Views/PageAccueil.xaml index 573bd8b..71aab78 100644 --- a/GameAtlas/GameAtlas/Views/PageAccueil.xaml +++ b/GameAtlas/GameAtlas/Views/PageAccueil.xaml @@ -9,7 +9,7 @@ - + @@ -45,12 +45,7 @@ - - - - - - +