je me suis trompé

dictionnaire
Vianney JOURDY 2 years ago
parent 09d3c28ba4
commit f8ba032476

@ -1,9 +1,12 @@
using MangaMap.Views; using MangaMap.Model;
using MangaMap.Views;
namespace MangaMap; namespace MangaMap;
public partial class App : Application public partial class App : Application
{ {
public Manager MyManager { get; private set; } = new Manager();
public App() public App()
{ {
InitializeComponent(); InitializeComponent();

@ -6,7 +6,29 @@ using System.Threading.Tasks;
namespace MangaMap.Model namespace MangaMap.Model
{ {
internal class Manager public class Manager
{ {
public List<Admin> Admins { get; private set; }
public List<Utilisateur> Utilisateurs { get; private set; }
public List<Oeuvre> Oeuvres { get; private set; }
public Manager() {
Admins = new List<Admin>();
Utilisateurs = new List<Utilisateur>();
Oeuvres = new List<Oeuvre>();
}
public void ajouterUtilisateur(Utilisateur u)
{
Utilisateurs.Add(u);
}
} }
} }

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace MangaMap.Model namespace MangaMap.Model
{ {
class Oeuvre public class Oeuvre
{ {
public string Nom { get; private set; } public string Nom { get; private set; }
public List <string> Genre { get; private set; } public List <string> Genre { get; private set; }

@ -6,14 +6,21 @@ using System.Threading.Tasks;
namespace MangaMap.Model namespace MangaMap.Model
{ {
public class Utilisateur public class Utilisateur : Personne
{ {
public string nom { get; private set; } public string nom { get; private set; }
public string prenom { get; private set; } public string prenom { get; private set; }
public int age { get; private set; } public int age { get; private set; }
public List<Oeuvre> ListeOeuvreEnVisionnage { get; private set; }
public List<Oeuvre> ListeOeuvreDejaVu { get; private set; }
public List<Oeuvre> ListeOeuvrePourPlusTard { get; private set; }
public List<Oeuvre> ListeOeuvreFavorites { get; private set; }
public Utilisateur(string nom, string prenom, int age) public Utilisateur(string nom, string prenom, int age)
{ {
this.Email = "rr";
this.Pseudo = "55";
this.MotDePasse = "45";
this.nom = nom; this.nom = nom;
this.prenom = prenom; this.prenom = prenom;
this.age = age; this.age = age;

@ -1,8 +1,13 @@
namespace MangaMap.Views; namespace MangaMap.Views;
using MangaMap.Model;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
public partial class signUpPage : ContentPage public partial class signUpPage : ContentPage
{ {
public Manager my_manager => (App.Current as App).MyManager;
public signUpPage() public signUpPage()
{ {
InitializeComponent(); InitializeComponent();
@ -47,6 +52,9 @@ public partial class signUpPage : ContentPage
await Navigation.PushAsync(new homePage()); await Navigation.PushAsync(new homePage());
} }
Utilisateur util = new Utilisateur("Ryan", "Garcia", 12);
my_manager.ajouterUtilisateur(util);
} }
bool IsPasswordStrong(string password) bool IsPasswordStrong(string password)

Loading…
Cancel
Save