diff --git a/Sources/IHM/App.xaml.cs b/Sources/IHM/App.xaml.cs
index 58578b3..2f0051b 100644
--- a/Sources/IHM/App.xaml.cs
+++ b/Sources/IHM/App.xaml.cs
@@ -10,10 +10,14 @@ namespace IHM
{
InitializeComponent();
- MainPage = new AppShell();
-
-
-
+ if(OperatingSystem.IsWindows() || OperatingSystem.IsMacOS())
+ {
+ MainPage = new AppShellDesktop();
+ }
+ else
+ {
+ MainPage = new AppShell();
+ }
}
}
diff --git a/Sources/IHM/AppShell.xaml b/Sources/IHM/AppShell.xaml
index cdeba6e..f5e6baf 100644
--- a/Sources/IHM/AppShell.xaml
+++ b/Sources/IHM/AppShell.xaml
@@ -3,7 +3,7 @@
x:Class="IHM.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:local="clr-namespace:IHM"
+ xmlns:local="clr-namespace:IHM.Mobile"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False">
diff --git a/Sources/IHM/AppShell.xaml.cs b/Sources/IHM/AppShell.xaml.cs
index 1ced756..e82d776 100644
--- a/Sources/IHM/AppShell.xaml.cs
+++ b/Sources/IHM/AppShell.xaml.cs
@@ -1,4 +1,5 @@
-using Model;
+using IHM.Mobile;
+using Model;
namespace IHM
{
@@ -16,6 +17,8 @@ namespace IHM
}
+
+
}
diff --git a/Sources/IHM/AppShellDesktop.xaml b/Sources/IHM/AppShellDesktop.xaml
new file mode 100644
index 0000000..a84f38e
--- /dev/null
+++ b/Sources/IHM/AppShellDesktop.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/Sources/IHM/AppShellDesktop.xaml.cs b/Sources/IHM/AppShellDesktop.xaml.cs
new file mode 100644
index 0000000..5193cab
--- /dev/null
+++ b/Sources/IHM/AppShellDesktop.xaml.cs
@@ -0,0 +1,19 @@
+using IHM.Desktop;
+using Model;
+
+namespace IHM
+{
+ public partial class AppShellDesktop : Shell
+ {
+ public Manager Mgr => (App.Current as App).Manager;
+
+ public AppShellDesktop()
+ {
+ InitializeComponent();
+ }
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/MainPage.xaml b/Sources/IHM/Desktop/MainPage.xaml
new file mode 100644
index 0000000..30488e8
--- /dev/null
+++ b/Sources/IHM/Desktop/MainPage.xaml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/MainPage.xaml.cs b/Sources/IHM/Desktop/MainPage.xaml.cs
new file mode 100644
index 0000000..6aa33e5
--- /dev/null
+++ b/Sources/IHM/Desktop/MainPage.xaml.cs
@@ -0,0 +1,59 @@
+using Model;
+using System.Windows.Input;
+
+namespace IHM.Desktop;
+
+public partial class MainPage : ContentPage
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ public MainPage()
+ {
+ InitializeComponent();
+ BindingContext = this;
+ }
+
+ public void ConnectionOnClicked(object sender, EventArgs e)
+ {
+ if (EntryMail.Text == null || EntryPassworld.Text == null)
+ {
+ AffichError("Champ invalide", "Veuillez compléter tout les champs", "OK");
+ }
+ else
+ {
+ if (Mgr.existEmail(EntryMail.Text))
+ {
+ if (Mgr.isEqualHash(Mgr.recupMdpBdd(EntryMail.Text), EntryPassworld.Text))
+ {
+ Mgr.LoadInscrit(EntryMail.Text, EntryPassworld.Text);
+ ConnexionValide();
+ }
+ else
+ {
+ AffichError("Mot de passe non valide", "Le mot de passe ne correspond pas à celui existant pout cette adresse mail", "OK");
+ }
+ }
+ else
+ {
+ AffichError("Compte inexistant", "Email ou mot de passe invalide", "OK");
+ }
+ }
+ }
+
+ private async void ConnexionValide()
+ {
+ await Navigation.PopModalAsync();
+ }
+
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+
+ protected override bool OnBackButtonPressed()
+ {
+ return true;
+ }
+
+ //Exception à gérer pour cette version desktop
+ public ICommand TapCommand => new Command(async (page) => await Shell.Current.GoToAsync(page));
+}
\ No newline at end of file
diff --git a/Sources/IHM/IHM.csproj b/Sources/IHM/IHM.csproj
index cd7edb2..768f160 100644
--- a/Sources/IHM/IHM.csproj
+++ b/Sources/IHM/IHM.csproj
@@ -32,10 +32,9 @@
-
+
PreserveNewest
-
@@ -80,10 +79,19 @@
-
+
+ AppShellDesktop.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
MSBuild:Compile
-
+
MSBuild:Compile
@@ -101,6 +109,9 @@
MSBuild:Compile
+
+ MSBuild:Compile
+
diff --git a/Sources/IHM/ChangePassword.xaml b/Sources/IHM/Mobile/ChangePassword.xaml
similarity index 96%
rename from Sources/IHM/ChangePassword.xaml
rename to Sources/IHM/Mobile/ChangePassword.xaml
index 673404d..a9703dc 100644
--- a/Sources/IHM/ChangePassword.xaml
+++ b/Sources/IHM/Mobile/ChangePassword.xaml
@@ -1,7 +1,7 @@