Modification de la note (double ou lieu de int)

pull/63/head
Rémi LAVERGNE 2 years ago
parent 2943026260
commit bca300256a

@ -21,7 +21,7 @@ namespace GameAtlas.Models
[DataMember] [DataMember]
public string Editeur { get; private set; } public string Editeur { get; private set; }
[DataMember] [DataMember]
public int Note { get; private set; } public double Note { get; private set; }
[DataMember] [DataMember]
public int NbTelechargement { get; private set; } public int NbTelechargement { get; private set; }
//[DataMember] //[DataMember]
@ -31,7 +31,7 @@ namespace GameAtlas.Models
[DataMember] [DataMember]
public string Image { get; private set; } public string Image { get; private set; }
public Jeu(string nom, string sortie, string plateformes, string developpeur, string editeur, int note, int nbTelechargement, string genres, string image) public Jeu(string nom, string sortie, string plateformes, string developpeur, string editeur, double note, int nbTelechargement, string genres, string image)
{ {
Nom = nom; Nom = nom;
Sortie = sortie; Sortie = sortie;

@ -21,13 +21,13 @@ namespace GameAtlas.Stub
ListUsers.Add(userTest); ListUsers.Add(userTest);
ListAdmins.Add(admin); ListAdmins.Add(admin);
Jeu TheLastOfUs = new Jeu("The Last Of Us Part I", "28 Mars 2023", "PS5 PC", "Naughty Dog LLC", "Naughty Dog LLC", 5, 487, "Solo Action Aventure", "cover_lastofus1.png"); Jeu TheLastOfUs = new Jeu("The Last Of Us Part I", "28 Mars 2023", "PS5 PC", "Naughty Dog LLC", "PlayStation PC LLC", 8.5, 487, "Solo Action Aventure", "cover_lastofus1.png");
Jeu ForzaHorizon = new Jeu("Forza Horizon 5", "9 Novembre 2021", "PC XOne", "Playground Games", "Xbox Game Studios", 4, 420, "Course Simulation Sport", "cover_forzahorizon5.png"); Jeu ForzaHorizon = new Jeu("Forza Horizon 5", "9 Novembre 2021", "PC XOne", "Playground Games", "Xbox Game Studios", 6.5, 420, "Course Simulation Sport", "cover_forzahorizon5.png");
Jeu TOTK = new Jeu("The Legend of Zelda: Tears of the Kingdom", "12 Mai 2023", "Switch", "Nintendo", "Nintendo", 5, 250, "Action Aventure", "cover_zelda.png"); Jeu TOTK = new Jeu("The Legend of Zelda: Tears of the Kingdom", "12 Mai 2023", "Switch", "Nintendo", "Nintendo", 10, 250, "Action Aventure", "cover_zelda.png");
Jeu ReadyOrNot = new Jeu("Ready or Not", "18 décembre 2021", "PC", "VOID Interactive", "VOID Interactive", 5, 100, "Solo Action Aventure", "cover_readyornot.png"); Jeu ReadyOrNot = new Jeu("Ready or Not", "18 Décembre 2021", "PC", "VOID Interactive", "VOID Interactive", 7, 100, "Solo Action Aventure", "cover_readyornot.png");
Jeu Hogwarts = new Jeu("Hogwarts Legacy : L'Héritage de Poudlard", "10 février 2023", "PC Switch XOne", "Avalanche Software", "Warner Bros. Games", 5, 100, "Solo Action Aventure RPG", "cover_hogwarts.png"); Jeu Hogwarts = new Jeu("Hogwarts Legacy : L'Héritage de Poudlard", "10 Février 2023", "PC Switch XOne", "Avalanche Software", "Warner Bros. Games", 5, 100, "Solo Action Aventure RPG", "cover_hogwarts.png");
Jeu RE4 = new Jeu("Resident Evil 4", "24 mars 2023", "PC XSeries", "CAPCOM Co., Ltd.", "CAPCOM Co., Ltd.", 5, 100, "Solo Action Aventure", "cover_residentevil4.png"); Jeu RE4 = new Jeu("Resident Evil 4", "24 Mars 2023", "PC XSeries", "CAPCOM Co., Ltd.", "CAPCOM Co., Ltd.", 8, 100, "Solo Action Aventure", "cover_residentevil4.png");
Jeu JediSurvivor = new Jeu("Star Wars Jedi: Survivor", "28 avril 2023", "PC XSeries", "Respawn", "Electronic Arts", 5, 100, "Solo Action Aventure", "cover_starwarsjedisurvivor.png"); Jeu JediSurvivor = new Jeu("Star Wars Jedi: Survivor", "28 Avril 2023", "PC XSeries", "Respawn", "Electronic Arts", 5.5, 100, "Solo Action Aventure", "cover_starwarsjedisurvivor.png");
ListJeu.Add(TheLastOfUs); ListJeu.Add(TheLastOfUs);
ListJeu.Add(ForzaHorizon); ListJeu.Add(ForzaHorizon);
ListJeu.Add(TOTK); ListJeu.Add(TOTK);

@ -122,7 +122,7 @@ public partial class PageAdmin : ContentPage
if (!annuler) if (!annuler)
{ {
Jeu adminJeu = new Jeu(nom, sortie, plateformes, developpeur, editeur, Convert.ToInt32(note), Convert.ToInt32(nbTelechargement), genre, image); Jeu adminJeu = new Jeu(nom, sortie, plateformes, developpeur, editeur, Convert.ToDouble(note), Convert.ToInt32(nbTelechargement), genre, image);
AdminManager.AddJeux(adminJeu); AdminManager.AddJeux(adminJeu);
AdminManager.SauvegardeDonnees(); AdminManager.SauvegardeDonnees();
AdminManager.OnPropertyChanged(nameof(AdminManager.ListJeux)); AdminManager.OnPropertyChanged(nameof(AdminManager.ListJeux));

Loading…
Cancel
Save