commit
1e43a67e68
@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_AddPlanification">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Primary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
|
||||||
|
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
|
||||||
|
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
|
||||||
|
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
|
||||||
|
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="annuler_button" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="annuler_button" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_AddPlanification : ContentView
|
||||||
|
{
|
||||||
|
public CV_AddPlanification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void annuler_button(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_Planification">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="Planifier une échéance" BackgroundColor="{StaticResource Primary}" TextColor="{StaticResource Secondary}" Grid.Column="0" Grid.Row="0" Clicked="Button_Clicked" ></Button>
|
||||||
|
<Button Text="Supprimer une échéance" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource Secondary}" Grid.Column="1" Grid.Row="0" Clicked="Button_Clicked_1"></Button>
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="15" x:Name="windowAjout">
|
||||||
|
<Grid BackgroundColor="{StaticResource Yellow300Accent}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Planification"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.Maui.Controls.Internals;
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_Planification : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_Planification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_AddPlanification();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Clicked_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
<?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.Desktop.ChangePassword"
|
||||||
|
Title="ChangePassword"
|
||||||
|
BackgroundColor="{StaticResource Primary}">
|
||||||
|
<VerticalStackLayout VerticalOptions="CenterAndExpand">
|
||||||
|
<Label
|
||||||
|
Text="Changer votre mot de passe"
|
||||||
|
VerticalOptions="Fill"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
FontSize="20"
|
||||||
|
Margin="20"/>
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40">
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="Nouveau mot de passe"
|
||||||
|
x:Name="EntryNewMdp"
|
||||||
|
IsPassword="True"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40,0,40,40">
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="Confirmer mot de passe"
|
||||||
|
x:Name="EntryNewMdpConfirmation"
|
||||||
|
IsPassword="True"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Button VerticalOptions="End"
|
||||||
|
x:Name="ValidationButton"
|
||||||
|
Text="valider"
|
||||||
|
Clicked="ValidationButton_Clicked"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,45 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
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,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Compte"
|
||||||
|
BackgroundColor="{StaticResource Yellow300Accent}">
|
||||||
|
|
||||||
|
<StackLayout Margin="20" Orientation="Vertical">
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="VOTRE COMPTE"
|
||||||
|
VerticalOptions="StartAndExpand"
|
||||||
|
Style="{StaticResource TitreWindows}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Label
|
||||||
|
FontAttributes="Bold"
|
||||||
|
Text="Compte courant --- 'BINDING'"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="CenterAndExpand"
|
||||||
|
FontFamily="Comic Sans MS"
|
||||||
|
FontSize="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="ConnexionButton"
|
||||||
|
Text="Modifier votre solde"
|
||||||
|
Style="{StaticResource WindowsButton}"
|
||||||
|
VerticalOptions="Fill"/>
|
||||||
|
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
</ContentView>
|
@ -0,0 +1,10 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Compte : ContentView
|
||||||
|
{
|
||||||
|
public Compte()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
<?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.Desktop.Dashboard"
|
||||||
|
Title="Dashboard">
|
||||||
|
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
<Image Source="logo_sans_fond.png" HeightRequest="100" Margin="50,10,0,0" Grid.Column="0" Grid.Row="0"/>
|
||||||
|
<Button Text="Mon compte" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" ></Button>
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="6">
|
||||||
|
<!--<Button Text="ACCUEIL" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource White}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="1" ></Button>-->
|
||||||
|
<Button Text="ACCUEIL" x:Name="ButAcc" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="1" ></Button>
|
||||||
|
<Button Text="COMPTE" x:Name="ButCom" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="2" Clicked="Button_compte"></Button>
|
||||||
|
<Button Text="OPERATION" x:Name="ButOpe" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="3" Clicked="Button_operation"></Button>
|
||||||
|
<Button Text="ECHEANCIER" x:Name="ButEch" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="4" Clicked="Button_echeancier"></Button>
|
||||||
|
<Button Text="PLANIFICATION" x:Name="ButPla" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="5" Clicked="Button_planification"></Button>
|
||||||
|
<Button Text="STATISTIQUES" x:Name="ButSta" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="6"></Button>
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="6" x:Name="mainCV">
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,59 @@
|
|||||||
|
using Microsoft.Maui.Graphics.Text;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Dashboard
|
||||||
|
{
|
||||||
|
|
||||||
|
public Dashboard()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RetourFormeBase()
|
||||||
|
{
|
||||||
|
ButPla.BackgroundColor = Colors.Yellow; ButPla.TextColor = Colors.Black;
|
||||||
|
ButEch.BackgroundColor = Colors.Yellow; ButEch.TextColor = Colors.Black;
|
||||||
|
ButOpe.BackgroundColor = Colors.Yellow; ButOpe.TextColor = Colors.Black;
|
||||||
|
ButCom.BackgroundColor = Colors.Yellow; ButCom.TextColor = Colors.Black;
|
||||||
|
ButAcc.BackgroundColor = Colors.Yellow; ButAcc.TextColor = Colors.Black;
|
||||||
|
ButSta.BackgroundColor = Colors.Yellow; ButSta.TextColor = Colors.Black;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_planification(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButPla.TextColor = Colors.White;
|
||||||
|
ButPla.BackgroundColor = Colors.Red;
|
||||||
|
mainCV.Content= new CV_Planification();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_echeancier(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButEch.TextColor = Colors.White;
|
||||||
|
ButEch.BackgroundColor = Colors.Red;
|
||||||
|
mainCV.Content = new Echeancier();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_operation(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButOpe.TextColor = Colors.White;
|
||||||
|
ButOpe.BackgroundColor = Colors.Red;
|
||||||
|
mainCV.Content = new Operations();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_compte(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButCom.TextColor = Colors.White;
|
||||||
|
ButCom.BackgroundColor = Colors.Red;
|
||||||
|
mainCV.Content = new Compte();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Echeancier"
|
||||||
|
BackgroundColor="{StaticResource Yellow300Accent}">
|
||||||
|
|
||||||
|
<VerticalStackLayout Margin="20">
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="ECHEANCIER"
|
||||||
|
VerticalOptions="StartAndExpand"/>
|
||||||
|
|
||||||
|
<HorizontalStackLayout HorizontalOptions="Center" VerticalOptions="Fill">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="SaveEcheance"
|
||||||
|
Text="Enregistrer une échéance"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="DelEcheance"
|
||||||
|
Text="Supprimer une échéance"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<HorizontalStackLayout HorizontalOptions="Center" VerticalOptions="Fill">
|
||||||
|
|
||||||
|
<Border Background="{StaticResource Primary}"
|
||||||
|
Style="{StaticResource TotalButton}">
|
||||||
|
<Label Text=" -- BINDING -- " FontFamily="Comic sans MS"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Background="{StaticResource Tertiary}"
|
||||||
|
Style="{StaticResource TotalButton}">
|
||||||
|
<Label Text=" -- BINDING -- " FontFamily="Comic sans MS"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentView>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Echeancier : ContentView
|
||||||
|
{
|
||||||
|
public Echeancier()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
<?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.Desktop.ForgetPassword"
|
||||||
|
Title="ForgetPassword"
|
||||||
|
BackgroundColor="{StaticResource Primary}">
|
||||||
|
|
||||||
|
<VerticalStackLayout Margin="20" Padding="30" VerticalOptions="CenterAndExpand">
|
||||||
|
<Label
|
||||||
|
Text="Rentrez votre adresse email :"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}">
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
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" VerticalOptions="End">
|
||||||
|
|
||||||
|
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40" >
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="6 Chiffres"
|
||||||
|
Keyboard="Numeric"
|
||||||
|
x:Name="EntryCodeRecept"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="ValidationButton"
|
||||||
|
Text="valider"
|
||||||
|
Clicked="ValideCode"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,68 @@
|
|||||||
|
using Model;
|
||||||
|
using Email = Model.Email;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
public void SearchEmail(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (EntryMail.Text == null)
|
||||||
|
{
|
||||||
|
AffichError("Email inconnue", "Aucun compte existant portant cette adresse mail", "OK");
|
||||||
|
}
|
||||||
|
if (Mgr.existEmail(EntryMail.Text))
|
||||||
|
{
|
||||||
|
Random generator = new Random();
|
||||||
|
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--;
|
||||||
|
|
||||||
|
await Task.Delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
ConnexionButton.Text = "valider Email";
|
||||||
|
ConnexionButton.IsEnabled = true;
|
||||||
|
}
|
||||||
|
private void ValideCode(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (EntryCodeRecept.Text == code)
|
||||||
|
{
|
||||||
|
NavigateTo();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void NavigateTo()
|
||||||
|
{
|
||||||
|
await Navigation.PushModalAsync(new ChangePassword(EntryMail.Text));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<?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.Desktop.Inscription"
|
||||||
|
Title="Inscription">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Label
|
||||||
|
Text="Welcome to .NET MAUI!"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Inscription : ContentPage
|
||||||
|
{
|
||||||
|
public Inscription()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Operations"
|
||||||
|
BackgroundColor="{StaticResource Yellow300Accent}">
|
||||||
|
<VerticalStackLayout Margin="20">
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="OPERATION"
|
||||||
|
VerticalOptions="StartAndExpand"/>
|
||||||
|
|
||||||
|
<HorizontalStackLayout HorizontalOptions="Center">
|
||||||
|
<Button
|
||||||
|
x:Name="AddCredit"
|
||||||
|
Text="Effectuer un crédit"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="RetireOperation"
|
||||||
|
Text="Retirer une opération"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="AddDebit"
|
||||||
|
Text="effectuer un débit"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="DelOperation"
|
||||||
|
Text="Supprimer une opération"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentView>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Operations : ContentView
|
||||||
|
{
|
||||||
|
public Operations()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
<?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.Desktop.Planification"
|
||||||
|
Title="Planification">
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Yellow300Accent}" >
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
<Image Source="logo_sans_fond.png" HeightRequest="100" Margin="50,10,0,0" Grid.Column="0" Grid.Row="0"/>
|
||||||
|
<Button Text="Mon compte" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" ></Button>
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="6">
|
||||||
|
|
||||||
|
<Button Text="ACCUEIL" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="1" ></Button>
|
||||||
|
<Button Text="COMPTE" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="2"></Button>
|
||||||
|
<Button Text="OPERATION" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="3"></Button>
|
||||||
|
<Button Text="ECHEANCIER" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="4"></Button>
|
||||||
|
<Button Text="PLANIFICATION" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource White}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="5"></Button>
|
||||||
|
<Button Text="STATISTIQUES" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="6"></Button>
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,15 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Planification : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public Planification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue