Fusion de la séparation des vues Mobile et Desktop
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
c8a17b0042
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Shell
|
||||
x:Class="IHM.AppShellDesktop"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:IHM.Desktop"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Shell.NavBarIsVisible="False">
|
||||
|
||||
<ShellContent
|
||||
ContentTemplate="{DataTemplate local:MainPage}"
|
||||
Route="Inscription" />
|
||||
|
||||
</Shell>
|
@ -0,0 +1,90 @@
|
||||
<?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.MainPage"
|
||||
Title="MainPage_Windows">
|
||||
<StackLayout BackgroundColor="{StaticResource Primary}">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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.Desktop;
|
||||
|
||||
public partial class MainPage : ContentPage
|
||||
{
|
||||
public Manager Mgr => (App.Current as App).Manager;
|
||||
public MainPage()
|
||||
{
|
||||
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));
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<?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"
|
||||
x:Class="IHM.Mobile.ChangePassword"
|
||||
Title="ChangePassword">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
@ -1,6 +1,6 @@
|
||||
using Model;
|
||||
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class ChangePassword : ContentPage
|
||||
{
|
@ -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.Mobile.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>
|
@ -1,6 +1,6 @@
|
||||
using Model;
|
||||
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class DashBoard : ContentPage
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
<?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"
|
||||
x:Class="IHM.Mobile.ForgetPassword"
|
||||
Title="ForgetPassword">
|
||||
<VerticalStackLayout
|
||||
Margin="20"
|
@ -1,7 +1,7 @@
|
||||
using Model;
|
||||
using Email = Model.Email;
|
||||
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class ForgetPassword : ContentPage
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
<?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"
|
||||
x:Class="IHM.Mobile.Inscription"
|
||||
Title="Inscription">
|
||||
<ScrollView>
|
||||
<VerticalStackLayout
|
@ -1,7 +1,7 @@
|
||||
using Model;
|
||||
using Email = Model.Email;
|
||||
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class Inscription : ContentPage
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class Operations : ContentPage
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
x:Class="IHM.Mobile.Planification">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Text="Planification"
|
@ -1,4 +1,4 @@
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class Planification : ContentPage
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
x:Class="IHM.Mobile.Settings">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Text="Paramètre"
|
@ -1,4 +1,4 @@
|
||||
namespace IHM;
|
||||
namespace IHM.Mobile;
|
||||
using Model;
|
||||
public partial class Settings : ContentPage
|
||||
{
|
@ -1,11 +0,0 @@
|
||||
<?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.Operations">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Text="Operations"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center" />
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
Loading…
Reference in new issue