diff --git a/GameAtlas/GameAtlas/GameAtlas.csproj.user b/GameAtlas/GameAtlas/GameAtlas.csproj.user index 843d30b..f7028d6 100644 --- a/GameAtlas/GameAtlas/GameAtlas.csproj.user +++ b/GameAtlas/GameAtlas/GameAtlas.csproj.user @@ -2,9 +2,9 @@ False - net7.0-windows10.0.19041.0 - Windows Machine - PhysicalDevice + net7.0-android + Pixel 5 - API 33 (1) (Android 13.0 - API 33) + Emulator pixel_5_-_api_33_1 diff --git a/GameAtlas/GameAtlas/Models/IPersistanceManager.cs b/GameAtlas/GameAtlas/Models/IPersistanceManager.cs index 3817798..f1b27ad 100644 --- a/GameAtlas/GameAtlas/Models/IPersistanceManager.cs +++ b/GameAtlas/GameAtlas/Models/IPersistanceManager.cs @@ -1,3 +1,4 @@ +<<<<<<< HEAD using System; using System.Collections.Generic; using System.Linq; @@ -14,3 +15,20 @@ namespace GameAtlas.Models } } +======= +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GameAtlas.Models +{ + public interface IPersistanceManager + { + List ChargeDonnees(); + + void SauvDonnees(List utilisateurs); + } +} +>>>>>>> 192f86a (N/A) diff --git a/GameAtlas/GameAtlas/Models/Jeu.cs b/GameAtlas/GameAtlas/Models/Jeu.cs index 17dd0ed..886cf1d 100644 --- a/GameAtlas/GameAtlas/Models/Jeu.cs +++ b/GameAtlas/GameAtlas/Models/Jeu.cs @@ -1,19 +1,27 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace GameAtlas.Models { + [DataContract] public class Jeu { - public string Nom; - public int Note; - public int NbTelechargement; - public string Plateforme; - public string Genre; - public string Image; + [DataMember] + public string Nom { get; private set; } + [DataMember] + public int Note { get; private set; } + [DataMember] + public int NbTelechargement { get; private set; } + [DataMember] + public string Plateforme { get; private set; } + [DataMember] + public string Genre { get; private set; } + [DataMember] + public string Image { get; private set; } public Jeu(string nom, int note, int nbTelechargement, string plateforme, string genre, string image) { @@ -25,13 +33,6 @@ namespace GameAtlas.Models Image = image; } - public Jeu(string nom) - { - Nom = nom; - Note = 5; - NbTelechargement = 2000; - Plateforme = "ps5"; - Genre = "action"; - } + } } diff --git a/GameAtlas/GameAtlas/Models/Manager.cs b/GameAtlas/GameAtlas/Models/Manager.cs index c1c1660..235409c 100644 --- a/GameAtlas/GameAtlas/Models/Manager.cs +++ b/GameAtlas/GameAtlas/Models/Manager.cs @@ -18,6 +18,7 @@ namespace GameAtlas.Models public Manager(IPersistanceManager persistance) { Utilisateurs = new List(); + ListJeux = new List(); Persistance = persistance; } diff --git a/GameAtlas/GameAtlas/Stub/Stub.cs b/GameAtlas/GameAtlas/Stub/Stub.cs index 38b1f62..b14bdee 100644 --- a/GameAtlas/GameAtlas/Stub/Stub.cs +++ b/GameAtlas/GameAtlas/Stub/Stub.cs @@ -1,3 +1,4 @@ +<<<<<<< HEAD using GameAtlas.Models; using System; using System.Collections.Generic; @@ -14,6 +15,10 @@ namespace GameAtlas.Stub List ListUsers = new List(); List ListJeu = new List(); Utilisateur user1 = new Utilisateur("test@gmail.com", "test", "Test1234"); + Jeu TheLastOfUs = new Jeu("The last of Us Part 1", 5, 487, "Ps5", "Aventure", "cover_lastofus1.png"); + Jeu ForzaHorizon = new Jeu("Forza Horizon 5", 4, 420, "Ps4", "Course", "cover_forzahorizon5.png"); + ListJeu.Add(TheLastOfUs); + ListJeu.Add(ForzaHorizon); ListUsers.Add(user1); return (ListJeu,ListUsers); } @@ -24,3 +29,33 @@ namespace GameAtlas.Stub } } } +======= +using GameAtlas.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GameAtlas.Stub +{ + public class Stub : IPersistanceManager + { + public List ChargeDonnees() + { + List ListUsers = new List(); + Utilisateur user1 = new Utilisateur("gmail@gmail.com", "MrLilian24", "mdp_Tres_Securise000"); + ListUsers.Add(user1); + return ListUsers; + } + + public void SauvDonnees(List utilisateurs) + { + using (FileStream fs = new FileStream(@"C:\data.xml", FileMode.OpenOrCreate)) + { + throw new NotImplementedException(); + } + } + } +} +>>>>>>> 192f86a (N/A) diff --git a/GameAtlas/GameAtlas/obj/GameAtlas.csproj.nuget.g.targets b/GameAtlas/GameAtlas/obj/GameAtlas.csproj.nuget.g.targets deleted file mode 100644 index af0173b..0000000 --- a/GameAtlas/GameAtlas/obj/GameAtlas.csproj.nuget.g.targets +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file