diff --git a/Sources/AppConsole/Program.cs b/Sources/AppConsole/Program.cs index d0b2251..82354c2 100644 --- a/Sources/AppConsole/Program.cs +++ b/Sources/AppConsole/Program.cs @@ -6,7 +6,7 @@ using System.Diagnostics.CodeAnalysis; namespace AppConsole { [ExcludeFromCodeCoverage] - class Program + static class Program { static void Main(string[] args) { diff --git a/Sources/Stim/App.xaml.cs b/Sources/Stim/App.xaml.cs index 9b20186..00ab9dd 100644 --- a/Sources/Stim/App.xaml.cs +++ b/Sources/Stim/App.xaml.cs @@ -10,7 +10,8 @@ public partial class App : Application public App() { InitializeComponent(); - MainPage = new AppShell(); + //Faut changer le boot sur LoginPage plus tard, j'ai mit create là pour pouvoir use l'appli, ce référer au comment sur create et loginpage. + MainPage = new Create(); if (File.Exists(Path.Combine(FileSystem.Current.AppDataDirectory, "games.xml"))) Manager = new Manager(new Persistance(FileSystem.Current.AppDataDirectory)); else Manager = new(new Stub()); } diff --git a/Sources/Stim/AppShell.xaml b/Sources/Stim/AppShell.xaml index bd67d6d..df7b4c2 100644 --- a/Sources/Stim/AppShell.xaml +++ b/Sources/Stim/AppShell.xaml @@ -10,9 +10,6 @@ > - diff --git a/Sources/Stim/AppShell.xaml.cs b/Sources/Stim/AppShell.xaml.cs index 69f710c..6b60c60 100644 --- a/Sources/Stim/AppShell.xaml.cs +++ b/Sources/Stim/AppShell.xaml.cs @@ -5,5 +5,5 @@ public partial class AppShell : Shell public AppShell() { InitializeComponent(); - } + } } diff --git a/Sources/Stim/Create.xaml b/Sources/Stim/Create.xaml index 2ed4b11..a5cf034 100644 --- a/Sources/Stim/Create.xaml +++ b/Sources/Stim/Create.xaml @@ -34,9 +34,9 @@ - + - + diff --git a/Sources/Stim/Create.xaml.cs b/Sources/Stim/Create.xaml.cs index bc9c52f..c7a969c 100644 --- a/Sources/Stim/Create.xaml.cs +++ b/Sources/Stim/Create.xaml.cs @@ -19,7 +19,8 @@ public partial class Create : ContentPage { ((App)App.Current).Manager.AddUsertoUserList(new("", Username.Text, "", Email.Text, Pswd.Text)); ((App)App.Current).Manager.CurrentUser = ((App)App.Current).Manager.SearchUser(Username.Text); - await Navigation.PushAsync(new MainPage()); + Application.Current.MainPage = new AppShell(); + await Shell.Current.GoToAsync("//MainPage"); } else throw new NotImplementedException(); } @@ -27,7 +28,8 @@ public partial class Create : ContentPage } } private async void Se_connecter(object sender, EventArgs e) - { + { + //Ca ça marche pas faut une autre commande, Marc svp aide moi await Navigation.PushAsync(new LoginPage()); } } \ No newline at end of file diff --git a/Sources/Stim/LoginPage.xaml.cs b/Sources/Stim/LoginPage.xaml.cs index c958165..419777a 100644 --- a/Sources/Stim/LoginPage.xaml.cs +++ b/Sources/Stim/LoginPage.xaml.cs @@ -19,11 +19,12 @@ public partial class LoginPage : ContentPage { if (user.Password == Pswd.Text) { - ((App)App.Current).Manager.CurrentUser = user; - await Navigation.PushAsync(new MainPage()); - } - - else throw new NotImplementedException(); + ((App)App.Current).Manager.CurrentUser = user; + Application.Current.MainPage = new AppShell(); + await Shell.Current.GoToAsync("//MainPage"); + } + + else throw new NotImplementedException(); } else { @@ -33,7 +34,7 @@ public partial class LoginPage : ContentPage } private async void Creer_un_compte(object sender, EventArgs e) - { - await Navigation.PushAsync(new Create()); + { + await Shell.Current.GoToAsync("//MainPage"); } } \ No newline at end of file