diff --git a/MangaMap/App.xaml.cs b/MangaMap/App.xaml.cs
index 74ca949..24756ad 100644
--- a/MangaMap/App.xaml.cs
+++ b/MangaMap/App.xaml.cs
@@ -1,9 +1,12 @@
-using MangaMap.Views;
+using MangaMap.Model;
+using MangaMap.Views;
namespace MangaMap;
public partial class App : Application
{
+ public Manager MyManager { get; private set; } = new Manager();
+
public App()
{
InitializeComponent();
diff --git a/MangaMap/CustomHeader.xaml b/MangaMap/CustomHeader.xaml
index b9827b1..ff0bfe8 100644
--- a/MangaMap/CustomHeader.xaml
+++ b/MangaMap/CustomHeader.xaml
@@ -7,6 +7,7 @@
+ VerticalOptions="Center"
+ Clicked="ImageButton_Clicked"/>
\ No newline at end of file
diff --git a/MangaMap/CustomHeader.xaml.cs b/MangaMap/CustomHeader.xaml.cs
index b34c7fb..3c3d567 100644
--- a/MangaMap/CustomHeader.xaml.cs
+++ b/MangaMap/CustomHeader.xaml.cs
@@ -1,9 +1,15 @@
-namespace MangaMap;
-
-public partial class NewContent1 : ContentView
-{
- public NewContent1()
- {
- InitializeComponent();
- }
+using MangaMap.Views;
+namespace MangaMap;
+
+public partial class NewContent1 : ContentView
+{
+ public NewContent1()
+ {
+ InitializeComponent();
+ }
+
+ void ImageButton_Clicked(System.Object sender, System.EventArgs e)
+ {
+ Navigation.PushAsync(new homePage());
+ }
}
\ No newline at end of file
diff --git a/MangaMap/Model/Admin.cs b/MangaMap/Model/Admin.cs
index 1ba1fe6..9ae0a3a 100644
--- a/MangaMap/Model/Admin.cs
+++ b/MangaMap/Model/Admin.cs
@@ -1,24 +1,27 @@
using MangaMap.Views;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MangaMap.Model
-{
- public class Admin : Personne
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MangaMap.Model
+{
+ public class Admin : Personne
{
- public Admin(string mdp, string email, string pseudo) : base(mdp, email, pseudo)
+ public Admin(string motDePasse, string email, string pseudo)
{
+ MotDePasse = motDePasse;
+ Email = email;
+ Pseudo = pseudo;
}
- public int Id { get; private set; }
-
-
-
- public void ajouterAnime() { }
-
- public void supprimerAnime() { }
- }
-}
+ public int Id { get; private set; }
+
+
+
+ public void ajouterAnime() { }
+
+ public void supprimerAnime() { }
+ }
+}
diff --git a/MangaMap/Model/Manager.cs b/MangaMap/Model/Manager.cs
new file mode 100644
index 0000000..db9593a
--- /dev/null
+++ b/MangaMap/Model/Manager.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MangaMap.Model
+{
+ public class Manager
+ {
+
+ public List Admins { get; private set; }
+ public List Utilisateurs { get; private set; }
+ public List Oeuvres { get; private set; }
+
+ public Manager() {
+ Admins = new List();
+ Utilisateurs = new List();
+ Oeuvres = new List();
+ }
+
+ public void ajouterUtilisateur(Utilisateur u)
+ {
+ Utilisateurs.Add(u);
+ }
+ }
+}
diff --git a/MangaMap/Model/Oeuvre.cs b/MangaMap/Model/Oeuvre.cs
index f506883..c8465b1 100644
--- a/MangaMap/Model/Oeuvre.cs
+++ b/MangaMap/Model/Oeuvre.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace MangaMap.Model
{
- class Oeuvre
+ public class Oeuvre
{
public string Nom { get; private set; }
public List Genre { get; private set; }
diff --git a/MangaMap/Model/Personne.cs b/MangaMap/Model/Personne.cs
index 0a4652c..313fcfa 100644
--- a/MangaMap/Model/Personne.cs
+++ b/MangaMap/Model/Personne.cs
@@ -8,18 +8,9 @@ namespace MangaMap.Model
{
public class Personne
{
- public string MotDePasse { get; private set; }
- public string Email { get; private set; }
- public string Pseudo { get; private set; }
-
- /*public Liste[] Listes { get; private set; }*/
-
- public Personne(string mdp, string email, string pseudo)
- {
- Email = email;
- Pseudo = pseudo;
- MotDePasse = mdp;
- }
+ public string MotDePasse { get; set; }
+ public string Email { get; set; }
+ public string Pseudo { get; set; }
public bool MofifierMotDePasse(string MotDePasse)
{
@@ -62,9 +53,5 @@ namespace MangaMap.Model
return false;
}
-
-
-
-
}
}
diff --git a/MangaMap/Model/Utilisateur.cs b/MangaMap/Model/Utilisateur.cs
index cd03369..c86579f 100644
--- a/MangaMap/Model/Utilisateur.cs
+++ b/MangaMap/Model/Utilisateur.cs
@@ -6,14 +6,21 @@ using System.Threading.Tasks;
namespace MangaMap.Model
{
- public class Utilisateur
+ public class Utilisateur : Personne
{
public string nom { get; private set; }
public string prenom { get; private set; }
public int age { get; private set; }
+ public List ListeOeuvreEnVisionnage { get; private set; }
+ public List ListeOeuvreDejaVu { get; private set; }
+ public List ListeOeuvrePourPlusTard { get; private set; }
+ public List ListeOeuvreFavorites { get; private set; }
- public Utilisateur(string nom, string prenom, int age)
+ public Utilisateur(string email, string pseudo, string mdp, string nom, string prenom, int age)
{
+ Email = email;
+ Pseudo = pseudo;
+ MotDePasse = mdp;
this.nom = nom;
this.prenom = prenom;
this.age = age;
diff --git a/MangaMap/Views/signUpPage.xaml b/MangaMap/Views/signUpPage.xaml
index cf42d95..4808c1a 100644
--- a/MangaMap/Views/signUpPage.xaml
+++ b/MangaMap/Views/signUpPage.xaml
@@ -10,6 +10,12 @@
+
+
+
+
+
+
diff --git a/MangaMap/Views/signUpPage.xaml.cs b/MangaMap/Views/signUpPage.xaml.cs
index fc6731a..190f906 100644
--- a/MangaMap/Views/signUpPage.xaml.cs
+++ b/MangaMap/Views/signUpPage.xaml.cs
@@ -1,8 +1,13 @@
namespace MangaMap.Views;
+
+using MangaMap.Model;
using System.Text.RegularExpressions;
public partial class signUpPage : ContentPage
{
+
+ public Manager my_manager => (App.Current as App).MyManager;
+
public signUpPage()
{
InitializeComponent();
@@ -11,7 +16,11 @@ public partial class signUpPage : ContentPage
async void OnSignUpClicked(object sender, System.EventArgs e)
{
// Récupérer les valeurs des entrées
+ string nom = nameEntry.Text;
+ string prénom = firstNameEntry.Text;
+ int age = Convert.ToInt32(ageEntry.Text);
string email = emailEntry.Text;
+ string pseudo = usernameEntry.Text;
string password = passwordEntry.Text;
string confirmPassword = confirmPasswordEntry.Text;
@@ -47,6 +56,9 @@ public partial class signUpPage : ContentPage
await Navigation.PushAsync(new homePage());
}
+ Utilisateur util = new Utilisateur(email, pseudo, password, nom, prénom, age);
+ my_manager.ajouterUtilisateur(util);
+
}
bool IsPasswordStrong(string password)