diff --git a/Sources/Data/PersLinqToPgSQL.cs b/Sources/Data/PersLinqToPgSQL.cs
index 2927b13..6faea87 100644
--- a/Sources/Data/PersLinqToPgSQL.cs
+++ b/Sources/Data/PersLinqToPgSQL.cs
@@ -19,7 +19,7 @@ namespace LinqToPgSQL
public class PersLinqToPgSQL : IPersistanceManager
{
private Hash hash = new Hash();
- string connexionBDD = String.Format("Server=90.114.135.116; Username=postgres; Database=conseco; Port=5432; Password=lulu; SSLMode=Prefer");
+ string connexionBDD = String.Format("Server=2.3.8.130; Username=postgres; Database=conseco; Port=5432; Password=lulu; SSLMode=Prefer");
public string LoadInscrit(string id, string mdp)
{
diff --git a/Sources/IHM/AppShellDesktop.xaml b/Sources/IHM/AppShellDesktop.xaml
index a84f38e..96abad7 100644
--- a/Sources/IHM/AppShellDesktop.xaml
+++ b/Sources/IHM/AppShellDesktop.xaml
@@ -8,7 +8,7 @@
Shell.NavBarIsVisible="False">
diff --git a/Sources/IHM/AppShellDesktop.xaml.cs b/Sources/IHM/AppShellDesktop.xaml.cs
index 5193cab..6775d2f 100644
--- a/Sources/IHM/AppShellDesktop.xaml.cs
+++ b/Sources/IHM/AppShellDesktop.xaml.cs
@@ -1,5 +1,9 @@
using IHM.Desktop;
+using IHM.Mobile;
using Model;
+using ChangePassword = IHM.Desktop.ChangePassword;
+using Compte = IHM.Desktop.Compte;
+using ForgetPassword = IHM.Desktop.ForgetPassword;
namespace IHM
{
@@ -10,10 +14,11 @@ namespace IHM
public AppShellDesktop()
{
InitializeComponent();
+ Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword));
+ Routing.RegisterRoute("ChangePassword", typeof(ChangePassword));
+ Routing.RegisterRoute("Compte", typeof(Compte));
+
}
-
-
-
}
}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/CV_AddPlanification.xaml b/Sources/IHM/Desktop/CV_AddPlanification.xaml
new file mode 100644
index 0000000..7c988d8
--- /dev/null
+++ b/Sources/IHM/Desktop/CV_AddPlanification.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/Desktop/CV_AddPlanification.xaml.cs b/Sources/IHM/Desktop/CV_AddPlanification.xaml.cs
new file mode 100644
index 0000000..d5aacb0
--- /dev/null
+++ b/Sources/IHM/Desktop/CV_AddPlanification.xaml.cs
@@ -0,0 +1,17 @@
+
+
+namespace IHM.Desktop;
+
+public partial class CV_AddPlanification : ContentView
+{
+ public CV_AddPlanification()
+ {
+ InitializeComponent();
+ }
+
+ private void annuler_button(object sender, EventArgs e)
+ {
+
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/CV_Planification.xaml b/Sources/IHM/Desktop/CV_Planification.xaml
new file mode 100644
index 0000000..7c38479
--- /dev/null
+++ b/Sources/IHM/Desktop/CV_Planification.xaml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/Desktop/CV_Planification.xaml.cs b/Sources/IHM/Desktop/CV_Planification.xaml.cs
new file mode 100644
index 0000000..890d95c
--- /dev/null
+++ b/Sources/IHM/Desktop/CV_Planification.xaml.cs
@@ -0,0 +1,26 @@
+using Microsoft.Maui.Controls.Internals;
+using Model;
+
+namespace IHM.Desktop;
+
+public partial class CV_Planification : ContentView
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ public CV_Planification()
+ {
+ InitializeComponent();
+
+
+
+ }
+
+ private void Button_Clicked(object sender, EventArgs e)
+ {
+ windowAjout.Content = new CV_AddPlanification();
+ }
+
+ private void Button_Clicked_1(object sender, EventArgs e)
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/ChangePassword.xaml b/Sources/IHM/Desktop/ChangePassword.xaml
new file mode 100644
index 0000000..1c94806
--- /dev/null
+++ b/Sources/IHM/Desktop/ChangePassword.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/ChangePassword.xaml.cs b/Sources/IHM/Desktop/ChangePassword.xaml.cs
new file mode 100644
index 0000000..4e98fc6
--- /dev/null
+++ b/Sources/IHM/Desktop/ChangePassword.xaml.cs
@@ -0,0 +1,45 @@
+using Model;
+
+namespace IHM.Desktop;
+
+public partial class ChangePassword : ContentPage
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ private string MailUser;
+ public ChangePassword(string mailUser)
+ {
+ InitializeComponent();
+ MailUser = mailUser;
+ }
+
+ private void ValidationButton_Clicked(object sender, EventArgs e)
+ {
+ if (EntryNewMdp.Text == null || EntryNewMdpConfirmation.Text == null)
+ {
+ AffichError("Champ non valide", "Veuillez remplir tout les champs", "OK");
+ }
+ else
+ {
+ if (!EntryNewMdp.Text.Equals(EntryNewMdpConfirmation.Text))
+ {
+ AffichError("mot de passe non identique", "veuillez entrer des mots de passe identique", "OK");
+ }
+ else
+ {
+ Mgr.changePasswordBdd(MailUser, EntryNewMdp.Text);
+ AffichError("mdp changé", "mot de passe bien changé", "ok");
+ NavigateTo("../..");
+ }
+ }
+ }
+
+ private async void NavigateTo(string path)
+ {
+ await Shell.Current.GoToAsync(path);
+ }
+
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Compte.xaml b/Sources/IHM/Desktop/Compte.xaml
new file mode 100644
index 0000000..ef7f299
--- /dev/null
+++ b/Sources/IHM/Desktop/Compte.xaml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Compte.xaml.cs b/Sources/IHM/Desktop/Compte.xaml.cs
new file mode 100644
index 0000000..d9bf12d
--- /dev/null
+++ b/Sources/IHM/Desktop/Compte.xaml.cs
@@ -0,0 +1,10 @@
+namespace IHM.Desktop;
+
+public partial class Compte : ContentView
+{
+ public Compte()
+ {
+ InitializeComponent();
+ }
+
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/DashBoard.xaml b/Sources/IHM/Desktop/DashBoard.xaml
new file mode 100644
index 0000000..d4149e9
--- /dev/null
+++ b/Sources/IHM/Desktop/DashBoard.xaml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Dashboard.xaml.cs b/Sources/IHM/Desktop/Dashboard.xaml.cs
new file mode 100644
index 0000000..edcacd6
--- /dev/null
+++ b/Sources/IHM/Desktop/Dashboard.xaml.cs
@@ -0,0 +1,59 @@
+using Microsoft.Maui.Graphics.Text;
+
+namespace IHM.Desktop;
+
+public partial class Dashboard
+{
+
+ public Dashboard()
+ {
+ InitializeComponent();
+ }
+
+ private void RetourFormeBase()
+ {
+ ButPla.BackgroundColor = Colors.Yellow; ButPla.TextColor = Colors.Black;
+ ButEch.BackgroundColor = Colors.Yellow; ButEch.TextColor = Colors.Black;
+ ButOpe.BackgroundColor = Colors.Yellow; ButOpe.TextColor = Colors.Black;
+ ButCom.BackgroundColor = Colors.Yellow; ButCom.TextColor = Colors.Black;
+ ButAcc.BackgroundColor = Colors.Yellow; ButAcc.TextColor = Colors.Black;
+ ButSta.BackgroundColor = Colors.Yellow; ButSta.TextColor = Colors.Black;
+ }
+
+ private void Button_planification(object sender, EventArgs e)
+ {
+ RetourFormeBase();
+ ButPla.TextColor = Colors.White;
+ ButPla.BackgroundColor = Colors.Red;
+ mainCV.Content= new CV_Planification();
+ }
+
+ private void Button_echeancier(object sender, EventArgs e)
+ {
+ RetourFormeBase();
+ ButEch.TextColor = Colors.White;
+ ButEch.BackgroundColor = Colors.Red;
+ mainCV.Content = new Echeancier();
+ }
+
+ private void Button_operation(object sender, EventArgs e)
+ {
+ RetourFormeBase();
+ ButOpe.TextColor = Colors.White;
+ ButOpe.BackgroundColor = Colors.Red;
+ mainCV.Content = new Operations();
+ }
+
+ private void Button_compte(object sender, EventArgs e)
+ {
+ RetourFormeBase();
+ ButCom.TextColor = Colors.White;
+ ButCom.BackgroundColor = Colors.Red;
+ mainCV.Content = new Compte();
+ }
+
+ private void Button_Clicked(object sender, EventArgs e)
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Echeancier.xaml b/Sources/IHM/Desktop/Echeancier.xaml
new file mode 100644
index 0000000..d942914
--- /dev/null
+++ b/Sources/IHM/Desktop/Echeancier.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Echeancier.xaml.cs b/Sources/IHM/Desktop/Echeancier.xaml.cs
new file mode 100644
index 0000000..98d43c4
--- /dev/null
+++ b/Sources/IHM/Desktop/Echeancier.xaml.cs
@@ -0,0 +1,9 @@
+namespace IHM.Desktop;
+
+public partial class Echeancier : ContentView
+{
+ public Echeancier()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/ForgetPassword.xaml b/Sources/IHM/Desktop/ForgetPassword.xaml
new file mode 100644
index 0000000..c37fdc3
--- /dev/null
+++ b/Sources/IHM/Desktop/ForgetPassword.xaml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/Desktop/ForgetPassword.xaml.cs b/Sources/IHM/Desktop/ForgetPassword.xaml.cs
new file mode 100644
index 0000000..4cd409b
--- /dev/null
+++ b/Sources/IHM/Desktop/ForgetPassword.xaml.cs
@@ -0,0 +1,68 @@
+using Model;
+using Email = Model.Email;
+
+namespace IHM.Desktop;
+
+public partial class ForgetPassword : ContentPage
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ private string code;
+ //private DateTime _startTime;
+ //private CancellationTokenSource _cancellationTokenSource;
+
+ public ForgetPassword()
+ {
+ InitializeComponent();
+ }
+ public void SearchEmail(object sender, EventArgs e)
+ {
+ if (EntryMail.Text == null)
+ {
+ AffichError("Email inconnue", "Aucun compte existant portant cette adresse mail", "OK");
+ }
+ if (Mgr.existEmail(EntryMail.Text))
+ {
+ Random generator = new Random();
+ code = generator.Next(0, 1000000).ToString("D6");
+ Email.CreateMail(EntryMail.Text, code);
+ ValidateReceptCode.IsVisible = true;
+ ConnexionButton.IsEnabled = false;
+ UpdateArc();
+ }
+ }
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+ private async void UpdateArc()
+ {
+ int timeRemaining = 60;
+ while (timeRemaining != 0)
+ {
+ ConnexionButton.Text = $"{timeRemaining}";
+
+ timeRemaining--;
+
+ await Task.Delay(1000);
+ }
+
+ ConnexionButton.Text = "valider Email";
+ ConnexionButton.IsEnabled = true;
+ }
+ private void ValideCode(object sender, EventArgs e)
+ {
+ if (EntryCodeRecept.Text == code)
+ {
+ NavigateTo();
+ }
+ else
+ {
+ AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
+ }
+ }
+
+ public async void NavigateTo()
+ {
+ await Navigation.PushModalAsync(new ChangePassword(EntryMail.Text));
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Inscription.xaml b/Sources/IHM/Desktop/Inscription.xaml
new file mode 100644
index 0000000..d83bb54
--- /dev/null
+++ b/Sources/IHM/Desktop/Inscription.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/Inscription.xaml.cs b/Sources/IHM/Desktop/Inscription.xaml.cs
new file mode 100644
index 0000000..6908912
--- /dev/null
+++ b/Sources/IHM/Desktop/Inscription.xaml.cs
@@ -0,0 +1,9 @@
+namespace IHM.Desktop;
+
+public partial class Inscription : ContentPage
+{
+ public Inscription()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/MainPage.xaml b/Sources/IHM/Desktop/MainPage.xaml
index f506127..26591d4 100644
--- a/Sources/IHM/Desktop/MainPage.xaml
+++ b/Sources/IHM/Desktop/MainPage.xaml
@@ -6,16 +6,11 @@
-
-
-
-
+ VerticalOptions="Start">
-
-
+
-
-
+
@@ -71,16 +60,17 @@
Text="Pas de compte ?"
/>
-