Ajout d'un bouton de déconnexion dans les paramétres
continuous-integration/drone/push Build is passing Details

pull/107/head
Lucas EVARD 2 years ago
parent 4a911ea421
commit 0d16419114

@ -23,6 +23,7 @@
Icon="planification_black.png" Icon="planification_black.png"
ContentTemplate="{DataTemplate local:Planification}" /> ContentTemplate="{DataTemplate local:Planification}" />
<ShellContent Title="Paramètres" <ShellContent Title="Paramètres"
x:Name="para"
Icon="settings_black.png" Icon="settings_black.png"
ContentTemplate="{DataTemplate local:Settings}" /> ContentTemplate="{DataTemplate local:Settings}" />
</TabBar> </TabBar>

@ -14,8 +14,7 @@ namespace IHM
Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword)); Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword));
Routing.RegisterRoute("ChangePassword", typeof(ChangePassword)); Routing.RegisterRoute("ChangePassword", typeof(ChangePassword));
} }
} }
} }

@ -1,4 +1,7 @@
using Model;  using Android.Bluetooth;
using AndroidX.Emoji2.Text.FlatBuffer;
using Microsoft.Maui.Controls;
using Model;
using System.Windows.Input; using System.Windows.Input;
namespace IHM namespace IHM

@ -4,8 +4,13 @@
x:Class="IHM.Settings"> x:Class="IHM.Settings">
<VerticalStackLayout> <VerticalStackLayout>
<Label <Label
Text="Para" Text="Paramètre"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Center" /> HorizontalOptions="Center" />
<Button
Text="Déconnexion"
VerticalOptions="End"
Clicked="deconnexionOnClicked"
HorizontalOptions="Center"/>
</VerticalStackLayout> </VerticalStackLayout>
</ContentPage> </ContentPage>

@ -1,9 +1,19 @@
namespace IHM; namespace IHM;
using Model;
public partial class Settings : ContentPage public partial class Settings : ContentPage
{ {
public Settings() public Manager Mgr => (App.Current as App).Manager;
public Settings()
{ {
InitializeComponent(); InitializeComponent();
} }
public void deconnexionOnClicked(object sender, EventArgs e)
{
Mgr.SelectedInscrit = null;
NavigateTo();
}
private async void NavigateTo()
{
await Navigation.PushModalAsync(new MainPage());
}
} }
Loading…
Cancel
Save