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"
ContentTemplate="{DataTemplate local:Planification}" />
<ShellContent Title="Paramètres"
x:Name="para"
Icon="settings_black.png"
ContentTemplate="{DataTemplate local:Settings}" />
</TabBar>

@ -14,8 +14,7 @@ namespace IHM
Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword));
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;
namespace IHM

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

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