Mise en place de la séparation des vue desktop et mobile + main page windows + réorganisation des dossier
continuous-integration/drone/push Build is passing Details

pull/116/head
Nicolas MAYE 2 years ago
parent 9b77b36c32
commit 52a134be86

@ -16,7 +16,10 @@ namespace IHM
{
MainPage = new UI_Windows.MainPage_Windows();
}
else if(OperatingSystem.IsAndroid() || OperatingSystem.IsIOS())
{
MainPage = new MainPage();
}
}
}

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.UI_Windows.MainPage_Windows"
Title="MainPage_Windows">
<StackLayout BackgroundColor="{StaticResource Primary}">
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
<StackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Start"
>
<Label
Margin="0,20,0,30"
HorizontalOptions="Center"
FontAttributes="Bold"
Text="Welcome To Cons'Eco"
FontSize="30"/>
<Image Source="logo_sans_fond.png" HorizontalOptions="Center" HeightRequest="200" />
<Border StrokeShape="RoundRectangle 20" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="{StaticResource White}"
TextColor="{StaticResource Black}"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Addresse mail"
x:Name="EntryMail"/>
</Border>
<Border StrokeShape="RoundRectangle 20" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="{StaticResource White}"
TextColor="{StaticResource Black}"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Mot de passe"
IsPassword="True"
x:Name="EntryPassworld"/>
</Border>
<Button
x:Name="ConnexionButton"
Text="Se connecter"
Clicked="ConnectionOnClicked"
HorizontalOptions="Center" />
<Label
Text="Mot de passe oublié ?"
TextColor="{StaticResource Yellow100Accent}"
Margin="5,0,0,0"
TextDecorations="Underline"
HorizontalOptions="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TapCommand}"
CommandParameter="ForgetPassword"/>
</Label.GestureRecognizers>
</Label>
<HorizontalStackLayout HorizontalOptions="Center">
<Label
Text="Pas de compte ?"
/>
<Label
Text="S'inscrire"
TextColor="{StaticResource Yellow100Accent}"
Margin="5,0,0,0"
TextDecorations="Underline">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TapCommand}"
CommandParameter="Inscription"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
</StackLayout>
</StackLayout>
</ContentPage>

@ -0,0 +1,59 @@
using Model;
using System.Windows.Input;
namespace IHM.UI_Windows;
public partial class MainPage_Windows : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public MainPage_Windows()
{
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<string>(async (page) => await Shell.Current.GoToAsync(page));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

@ -33,6 +33,9 @@
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\logo.svg" ForegroundFile="Resources\AppIcon\logo.svg" Color="#512BD4" BaseSize="100,100" />
<MauiImage Include="Desktop\logo_sans_fond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\NavBar\dollar_black.png" />
<MauiImage Include="Resources\Images\NavBar\settings_black.png" />
<Resource Include="Resources\Images\NavBar\home_black.png" />
@ -54,6 +57,10 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<None Remove="Desktop\logo_sans_fond.png" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\Images\NavBar\planification_black.png" />
</ItemGroup>
@ -73,9 +80,6 @@
<MauiXaml Update="ChangePassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="DashBoard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ForgetPassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
@ -91,7 +95,7 @@
<MauiXaml Update="Inscription.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="UI_Windows\MainPage_Windows.xaml">
<MauiXaml Update="Desktop\MainPage_Windows.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.ChangePassword"
Title="ChangePassword">
<VerticalStackLayout>
<Label
Text="Changer votre mot de passe"
VerticalOptions="Center"
HorizontalOptions="Center"
FontSize="20"
Margin="20"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Nouveau mot de passe"
x:Name="EntryNewMdp"
IsPassword="True"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40,0,40,40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Confirmer mot de passe"
x:Name="EntryNewMdpConfirmation"
IsPassword="True"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValidationButton_Clicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,45 @@
using Model;
namespace IHM;
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);
}
}

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.DashBoard">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="1.40*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
</HorizontalStackLayout>
<ImageButton Grid.Row="0" Grid.Column="1" Source="Resources/Images/Dashboard/account_banks.png"
HorizontalOptions="End" Padding="10" Margin="10"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"/>
<Label Grid.Row="1" Grid.ColumnSpan="2" Text="Liste des Dernières Opérations : " FontAttributes="Bold" FontSize="Body" Padding="20,5,0,0"/>
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding LesOpe}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}"
CornerRadius="10"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding NomOpe}"
FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding DetailTypeOpe}"
FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOpe}"/>
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding MontantOpe}"
FontAttributes="Bold"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Label Grid.Row="3" Grid.ColumnSpan="2" Text="Liste des Comptes favoris :" FontAttributes="Bold" FontSize="Body" Padding="20,0,0,0"/>
<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding ComptesFav}" ItemsLayout="HorizontalList">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="{Binding Banque}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding Type}"
FontAttributes="Italic"/>
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding Solde}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateMaJ}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ContentPage>

@ -0,0 +1,27 @@
using Model;
namespace IHM;
public partial class DashBoard : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public DashBoard()
{
InitializeComponent();
//Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
if (Mgr.SelectedInscrit == null)
{
loadInscription();
}
}
public async void loadInscription()
{
await Navigation.PushModalAsync(new MainPage());
}
}

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.ForgetPassword"
Title="ForgetPassword">
<VerticalStackLayout
Margin="20"
Padding="30">
<Label
Text="Rentrée votre adresse email :"
HorizontalOptions="Center" />
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Email"
x:Name="EntryMail"/>
</Border>
<Button
x:Name="ConnexionButton"
Text="valider Email"
Clicked="SearchEmail"
HorizontalOptions="Center" />
<VerticalStackLayout x:Name="ValidateReceptCode" IsVisible="false" Margin="20">
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
HorizontalOptions="Center"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="6 Chiffres"
Keyboard="Numeric"
x:Name="EntryCodeRecept"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValideCode"
HorizontalOptions="Center" />
</VerticalStackLayout>
</VerticalStackLayout>
</ContentPage>

@ -7,6 +7,9 @@ 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();
@ -22,14 +25,30 @@ public partial class ForgetPassword : ContentPage
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--;
private void ValideCode(object sender, EventArgs e)
await Task.Delay(1000);
}
ConnexionButton.Text = "valider Email";
ConnexionButton.IsEnabled = true;
}
private void ValideCode(object sender, EventArgs e)
{
if(EntryCodeRecept.Text == code)
{

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Inscription"
Title="Inscription">
<ScrollView>
<VerticalStackLayout
Margin="10"
Padding="30">
<Label
Text="Renter vos identifiants"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Nom"
x:Name="EntryNewName"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Prenom"
x:Name="EntryNewSurname"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Adresse mail"
x:Name="EntryNewMail"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Mot de passe"
IsPassword="True"
x:Name="EntryNewPassword"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Confirmer mot de passe"
IsPassword="True"
x:Name="EntryConfirmationPassword"/>
</Border>
<Button
x:Name="InscriptionButton"
Text="Créer son compte"
Clicked="InscriptionOnClicked"
HorizontalOptions="Center" />
<VerticalStackLayout x:Name="ValidateReceptCode" IsVisible="false" Margin="20">
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
HorizontalOptions="Center"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="6 Chiffres"
Keyboard="Numeric"
x:Name="EntryCodeRecept"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValideCode"
HorizontalOptions="Center" />
</VerticalStackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,73 @@
using Model;
using Email = Model.Email;
namespace IHM;
public partial class Inscription : ContentPage
{
private string code;
public Manager Mgr => (App.Current as App).Manager;
public Inscription()
{
InitializeComponent();
}
public void InscriptionOnClicked(object sender, EventArgs e)
{
if (EntryNewName.Text == null || EntryNewMail.Text == null || EntryConfirmationPassword.Text == null || EntryNewPassword.Text == null ||
EntryNewSurname.Text == null)
{
AffichError("Champ invalide", "Veuillez compléter tout les champs", "OK");
}
else
{
if(EntryNewPassword.Text.Equals(EntryConfirmationPassword.Text)) {
if (Mgr.existEmail(EntryNewMail.Text))
{
AffichError("Mail existant", "un compte porte déjà cette adresse mail, veuillez en changer", "OK");
}
else
{
try
{
Random generator = new Random();
code = generator.Next(0, 1000000).ToString("D6");
Email.CreateMail(EntryNewMail.Text, code);
ValidateReceptCode.IsVisible = true;
}
catch (Exception ex)
{
AffichError("Information invalide", ex.Message, "OK");
}
}
}
else
{
AffichError("Mot de passe de confirmation invalide", "Veuillez mettre deux mots de passe identiques", "OK");
}
}
}
private void ValideCode(object sender, EventArgs e)
{
if (EntryCodeRecept.Text == code)
{
Inscrit inscrit = new Inscrit(Mgr.lastInscrit() + 1, EntryNewName.Text, EntryNewMail.Text, EntryNewSurname.Text, EntryNewPassword.Text);
Mgr.createInscrit(inscrit);
AffichError("compte créé", "Compte bien créé", "OK");
NavigateTo("..");
}
else
{
AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
}
}
private async void AffichError(string s, string s1, string s2)
{
await DisplayAlert(s, s1, s2);
}
private async void NavigateTo(string s)
{
await Shell.Current.GoToAsync(s);
}
}

@ -10,26 +10,27 @@
VerticalOptions="Start">
<Label
Margin="0,20,-80,0"
Margin="0,20,0,30"
HorizontalOptions="Center"
FontAttributes="Bold"
Text="Welcome To Cons'Eco"
FontSize="30"/>
<Image Source="Resources/Images/logo_sans_fond.png"
HorizontalOptions="Center"
Scale="0.5"/>
<Image Source="{AppThemeBinding Light=Resources/Images/logo_sans_fond_black.png, Dark=Resources/Images/logo_sans_fond.png}"
HorizontalOptions="Center" HeightRequest="200"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
<Border StrokeShape="RoundRectangle 20" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="{StaticResource White}"
TextColor="{StaticResource Black}"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Addresse mail"
x:Name="EntryMail"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
<Border StrokeShape="RoundRectangle 20" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="{StaticResource White}"
TextColor="{StaticResource Black}"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Mot de passe"
@ -45,8 +46,8 @@
HorizontalOptions="Center" />
<Label
Text="Mot de passe oublier "
TextColor="Blue"
Text="Mot de passe oublié ?"
TextColor="{StaticResource Primary}"
Margin="5,0,0,0"
TextDecorations="Underline"
HorizontalOptions="Center">
@ -64,7 +65,7 @@
<Label
Text="S'inscrire"
TextColor="Blue"
TextColor="{StaticResource Primary}"
Margin="5,0,0,0"
TextDecorations="Underline">
<Label.GestureRecognizers>

@ -1,7 +1,4 @@
 using Android.Bluetooth;
using AndroidX.Emoji2.Text.FlatBuffer;
using Microsoft.Maui.Controls;
using Model;
using Model;
using System.Windows.Input;
namespace IHM
@ -50,7 +47,12 @@ namespace IHM
{
await DisplayAlert(s, s1, s2);
}
protected override bool OnBackButtonPressed()
{
return true;
}
public ICommand TapCommand => new Command<string>(async (page) => await Shell.Current.GoToAsync(page));
}
}

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.DashBoard">
x:Class="IHM.Operations">
<VerticalStackLayout>
<Label
Text="Dashboard"
Text="Operations"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>

@ -0,0 +1,9 @@
namespace IHM;
public partial class Operations : ContentPage
{
public Operations()
{
InitializeComponent();
}
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Planification">
<VerticalStackLayout>
<Label
Text="Planification"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace IHM;
public partial class Planification : ContentPage
{
public Planification()
{
InitializeComponent();
}
}

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Settings">
<VerticalStackLayout>
<Label
Text="Paramètre"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Button
Text="Déconnexion"
VerticalOptions="End"
Clicked="deconnexionOnClicked"
HorizontalOptions="Center"/>
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,19 @@
namespace IHM;
using Model;
public partial class Settings : ContentPage
{
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