💄 add images dictionary, banquale color and work on UI

pull/50/head
Antoine PEREDERII 2 years ago
parent 069fd3f8f3
commit 4b6114fe1e

@ -11,6 +11,7 @@
<!-- Only light theme --> <!-- Only light theme -->
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
<ResourceDictionary Source="Resources/Images/images_dictionary.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>

@ -17,25 +17,25 @@
Title="Solde" Title="Solde"
ContentTemplate="{DataTemplate views:BalancePage}" ContentTemplate="{DataTemplate views:BalancePage}"
Route="balance" Route="balance"
Icon="home.png"/> Icon="{StaticResource HomeIcon}"/>
<ShellContent <ShellContent
Title="Transactions" Title="Transactions"
ContentTemplate="{DataTemplate transfer:MenuTransferPage}" ContentTemplate="{DataTemplate transfer:MenuTransferPage}"
Route="menu" Route="menu"
Icon="transactions.png"/> Icon="{StaticResource TransactionsIcon}"/>
<ShellContent <ShellContent
Title="Aide" Title="Aide"
ContentTemplate="{DataTemplate views:HelpPage}" ContentTemplate="{DataTemplate views:HelpPage}"
Route="help" Route="help"
Icon="help.png"/> Icon="{StaticResource HelpIcon}"/>
<ShellContent <ShellContent
Title="Compte" Title="Compte"
ContentTemplate="{DataTemplate views:SwitchAccountPage}" ContentTemplate="{DataTemplate views:SwitchAccountPage}"
Route="account" Route="account"
Icon="accounts.png"/> Icon="{StaticResource AccountIcon}"/>
</TabBar> </TabBar>

@ -30,13 +30,16 @@
<MauiSplashScreen Include="Resources\Splash\splash.png" Color="#a8daab" BaseSize="128,128" /> <MauiSplashScreen Include="Resources\Splash\splash.png" Color="#a8daab" BaseSize="128,128" />
<!-- Images --> <!-- Images -->
<MauiImage Include="Resources\Images\*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" /> <MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) --> <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
<MauiImage Include="Resources\Images\sources\accounts.svg" />
<MauiImage Include="Resources\Images\sources\dotnet_bot.svg" />
<MauiImage Include="Resources\Images\sources\help.svg" />
<MauiImage Include="Resources\Images\sources\home.svg" />
<MauiImage Include="Resources\Images\sources\transactions.svg" />
<MauiImage Include="Resources\Images\sources\banquale.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -51,12 +54,19 @@
<None Remove="DataContractPersistance\" /> <None Remove="DataContractPersistance\" />
<None Remove="Views\Category\" /> <None Remove="Views\Category\" />
<None Remove="Test\" /> <None Remove="Test\" />
<None Remove="Resources\Images\Sources\accounts.svg" />
<None Remove="Resources\Images\Sources\back_arrow_icon.svg" />
<None Remove="Resources\Images\Sources\dotnet_bot.svg" />
<None Remove="Resources\Images\Sources\help.svg" />
<None Remove="Resources\Images\Sources\home.svg" />
<None Remove="Resources\Images\Sources\transactions.svg" />
<None Remove="Resources\Images\sources\banquale.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Remove="Resources\Images\Images.xaml" /> <MauiXaml Remove="Resources\Images\Images.xaml" />
<MauiXaml Remove="Resources\Images\Dictionary1.xaml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BundleResource Include="Resources\Images\back_arrow_icon.svg" />
<MauiXaml Remove="Resources\Images\Images.xaml" /> <MauiXaml Remove="Resources\Images\Images.xaml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -65,4 +75,8 @@
<Folder Include="Views\Category\" /> <Folder Include="Views\Category\" />
<Folder Include="Test\" /> <Folder Include="Test\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\Images\ImagesDictionary.xaml" />
<None Include="Resources\Images\images_dictionary.xaml" />
</ItemGroup>
</Project> </Project>

@ -101,9 +101,9 @@ namespace Banquale.Model
internal static void DoTransactions(Entry name, Entry iban, Entry sum) internal static void DoTransactions(Entry name, Entry iban, Entry sum)
{ {
Debug.WriteLine(name); Debug.WriteLine(name.Text);
Debug.WriteLine(iban); Debug.WriteLine(iban.Text);
Debug.WriteLine(sum); Debug.WriteLine(sum.Text);
Debug.WriteLine("Transaction successed !"); Debug.WriteLine("Transaction successed !");

@ -12,6 +12,8 @@ namespace Banquale.Model
[DataMember] [DataMember]
public Consultant Consultant { get; private set; } // 1 SEUL consultant public Consultant Consultant { get; private set; } // 1 SEUL consultant
public bool IsConsultant { get; set; } = false;
public Customer SelectedCustomer public Customer SelectedCustomer
{ {
get => selectedCustomer; get => selectedCustomer;

@ -0,0 +1,12 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<FileImageSource x:Key="AccountIcon">Images/sources/accounts.png</FileImageSource>
<FileImageSource x:Key="DotnetIcon">Images/sources/dotnet_bot.png</FileImageSource>
<FileImageSource x:Key="HelpIcon">Images/sources/help.png</FileImageSource>
<FileImageSource x:Key="BackArrowIcon">Images/sources/back_arrow.png</FileImageSource>
<FileImageSource x:Key="HomeIcon">Images/sources/home.png</FileImageSource>
<FileImageSource x:Key="TransactionsIcon">Images/sources/transactions.png</FileImageSource>
<FileImageSource x:Key="BanqualeIcon">Images/sources/banquale</FileImageSource>
</ResourceDictionary>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -14,6 +14,7 @@
<Color x:Key="White">White</Color> <Color x:Key="White">White</Color>
<Color x:Key="Black">Black</Color> <Color x:Key="Black">Black</Color>
<Color x:Key="Banquale">#aad7aa</Color>
<Color x:Key="Gray100">#E1E1E1</Color> <Color x:Key="Gray100">#E1E1E1</Color>
<Color x:Key="Gray200">#C8C8C8</Color> <Color x:Key="Gray200">#C8C8C8</Color>
@ -23,6 +24,7 @@
<Color x:Key="Gray600">#404040</Color> <Color x:Key="Gray600">#404040</Color>
<Color x:Key="Gray900">#212121</Color> <Color x:Key="Gray900">#212121</Color>
<Color x:Key="Gray950">#141414</Color> <Color x:Key="Gray950">#141414</Color>
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/> <SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/> <SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/> <SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>

@ -7,59 +7,72 @@
Title="BalancePage" Title="BalancePage"
Shell.NavBarIsVisible="False"> Shell.NavBarIsVisible="False">
<Grid RowDefinitions="auto, *"> <Grid RowDefinitions="auto, auto, *">
<Grid BackgroundColor="Beige"
HorizontalOptions="Center"
HeightRequest="100"
MaximumHeightRequest="150"
WidthRequest="230"
RowDefinitions="auto, 35, *"
ColumnDefinitions="250, auto"
Grid.Row="0"
Margin="30">
<Grid.GestureRecognizers>
<TapGestureRecognizer
Tapped="Balance_Clicked"
NumberOfTapsRequired="1" />
</Grid.GestureRecognizers>
<Label
Text="Compte Professionnel"
HorizontalOptions="Center"
Margin="0, 15, 0, 0"/>
<HorizontalStackLayout
Grid.Row="1"
HorizontalOptions="Center">
<Label <Frame BackgroundColor="{StaticResource Key=Banquale}"
Text="{Binding Name}" CornerRadius="15"
Margin="0, 0, 5, 0"/> HorizontalOptions="Center"
HeightRequest="120"
WidthRequest="230"
Margin="0, 50, 0, 50">
<Label <Grid BackgroundColor="Transparent"
Text="{Binding FirstName}" HorizontalOptions="Center"
Margin="5, 0, 0, 0"/> HeightRequest="100"
MaximumHeightRequest="150"
</HorizontalStackLayout> RowDefinitions="auto, 35, *"
ColumnDefinitions="250, auto">
<Grid ColumnDefinitions="auto, auto, auto" <Grid.GestureRecognizers>
Grid.Row="2" <TapGestureRecognizer
HorizontalOptions="Center"> Tapped="Balance_Clicked"
NumberOfTapsRequired="1" />
</Grid.GestureRecognizers>
<Label <Label
Text="Solde" Text="Compte Professionnel"
Margin="0, 0, 50, 0"/> HorizontalOptions="Center"
<Label Margin="0, 15, 0, 0"/>
Text="{Binding Balance, StringFormat='{0} €'}"
Grid.Column="1" <HorizontalStackLayout
Margin="50, 0, 5, 0"/> Grid.Row="1"
HorizontalOptions="Center">
<Label
Text="{Binding Name}"
Margin="0, 0, 5, 0"/>
<Label
Text="{Binding FirstName}"
Margin="5, 0, 0, 0"/>
</HorizontalStackLayout>
<Grid ColumnDefinitions="auto, auto, auto"
Grid.Row="2"
HorizontalOptions="Center">
<Label
Text="Solde"
Margin="0, 0, 50, 0"/>
<Label
Text="{Binding Balance, StringFormat='{0} €'}"
Grid.Column="1"
Margin="50, 0, 5, 0"/>
</Grid>
</Grid> </Grid>
</Grid>
<ListView ItemsSource="{Binding TransactionsList}" Grid.Row="1" </Frame>
<BoxView
Color="{StaticResource Key=Gray100}"
Grid.Row="1"
HeightRequest="1"/>
<ListView ItemsSource="{Binding TransactionsList}"
Grid.Row="2"
SelectionMode="None"> SelectionMode="None">
<ListView.ItemTemplate> <ListView.ItemTemplate>
@ -69,31 +82,34 @@
<ViewCell> <ViewCell>
<Grid <Grid
ColumnDefinitions="40, 3*, *" ColumnDefinitions="40, 3*, *"
Margin="20, 5, 20, 5" Margin="20, 5, 20, 5"
HorizontalOptions="Fill"> HorizontalOptions="Fill">
<Grid.GestureRecognizers>
<TapGestureRecognizer
Tapped="Transaction_Clicked"
NumberOfTapsRequired="1" />
<Grid.GestureRecognizers> </Grid.GestureRecognizers>
<TapGestureRecognizer
Tapped="Transaction_Clicked"
NumberOfTapsRequired="1" />
</Grid.GestureRecognizers> <Image
Source="dotnet_bot.png"
Grid.Column="0"
MaximumHeightRequest="30"/>
<Image Source="dotnet_bot.png"
Grid.Column="0"
MaximumHeightRequest="30"/>
<Label <Label
Text="{Binding Date, StringFormat='{0:ddd dd MMM yyyy}'}" Text="{Binding Date, StringFormat='{0:ddd dd MMM yyyy}'}"
Grid.Column="1" Grid.Column="1"
VerticalOptions="Center" VerticalOptions="Center"
Margin="10, 0, 0, 0"/> Margin="10, 0, 0, 0"/>
<Label <Label
Text="{Binding Sum, StringFormat='{0} €'}" Text="{Binding Sum, StringFormat='{0} €'}"
Grid.Column="2" Grid.Column="2"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="End" HorizontalOptions="End"
Margin="0, 0, 20, 0"/> Margin="0, 0, 20, 0"/>
</Grid> </Grid>

@ -7,7 +7,10 @@
<VerticalStackLayout VerticalOptions="Center"> <VerticalStackLayout VerticalOptions="Center">
<Frame CornerRadius="20" Margin="20, 150, 20, 0"> <Image Source="{StaticResource BanqualeIcon}"/>
<Frame CornerRadius="20" Margin="20, 70, 20, 0">
<Entry <Entry
Placeholder="Identifiant" Placeholder="Identifiant"
@ -21,7 +24,7 @@
</Frame> </Frame>
<Frame CornerRadius="20" Margin="20, 50, 20, 0"> <Frame CornerRadius="20" Margin="20, 35, 20, 0">
<Entry <Entry
Placeholder="Mot de passe" Placeholder="Mot de passe"
@ -40,7 +43,7 @@
BorderWidth="2" BorderWidth="2"
HorizontalOptions="Fill" HorizontalOptions="Fill"
MinimumHeightRequest="100" MinimumHeightRequest="100"
Margin="10, 100, 10, 0" Margin="10, 80, 10, 0"
FontSize="Large" FontSize="Large"
Clicked="Connection_Clicked"/> Clicked="Connection_Clicked"/>

@ -5,6 +5,7 @@ namespace Banquale.Views;
public partial class ConnectionPage : ContentPage public partial class ConnectionPage : ContentPage
{ {
public Manager Mgr => (App.Current as App).MyManager; public Manager Mgr => (App.Current as App).MyManager;
public ConnectionPage() public ConnectionPage()
{ {
InitializeComponent(); InitializeComponent();
@ -23,9 +24,14 @@ public partial class ConnectionPage : ContentPage
if(currentId == "1") if(currentId == "1")
{ {
Mgr.IsConsultant = true;
await Navigation.PushModalAsync(new ConsultantHomePage()); await Navigation.PushModalAsync(new ConsultantHomePage());
return; return;
} }
else
{
Mgr.IsConsultant = false;
}
//if(int.Parse(currentId) in Mgr.CustomersList) // FONCTIONNE PAS //if(int.Parse(currentId) in Mgr.CustomersList) // FONCTIONNE PAS
//{ //{

@ -24,7 +24,7 @@
HeightRequest="84"> HeightRequest="84">
<Button <Button
Text="{Binding Name, StringFormat=' Compte Personnel &#10; {0}'}" Text="{Binding Name, StringFormat=' Compte Personnel {0}'}"
Clicked="Transfer_Clicked" Clicked="Transfer_Clicked"
FontSize="Large" FontSize="Large"
Margin="20"/> Margin="20"/>

@ -58,7 +58,7 @@
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
HorizontalOptions="Center" HorizontalOptions="Center"
Text="{Binding InvolvedAccounts.Name, StringFormat='Paiment expédié par&#10; Compte {0}'}" Text="{Binding InvolvedAccounts.Name, StringFormat='Paiment expédié Compte {0}'}"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label <Label
@ -86,7 +86,7 @@
<Button <Button
Text="Faire opposition" Text="Faire opposition"
Margin="0, 50, 0, 0" Margin="0, 50, 0, 0"
Clicked="Objection_Clicked"/> Clicked="Objection_Clicked" x:Name="oppose"/>
</VerticalStackLayout> </VerticalStackLayout>

@ -9,6 +9,10 @@ public partial class TransactionsPage : ContentPage
{ {
InitializeComponent(); InitializeComponent();
BindingContext = Mgr.SelectedTransaction; BindingContext = Mgr.SelectedTransaction;
if(Mgr.IsConsultant == true)
{
oppose.Text = "Accepter l'oposition";
}
} }
async void Categ_Clicked(System.Object sender, System.EventArgs e) async void Categ_Clicked(System.Object sender, System.EventArgs e)
@ -21,4 +25,5 @@ public partial class TransactionsPage : ContentPage
await Shell.Current.Navigation.PopAsync(); await Shell.Current.Navigation.PopAsync();
} }
} }

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.Transfer.RequestPage"> x:Class="Banquale.Views.Transfer.RequestPage"
Title="Demander de l'argent">
<VerticalStackLayout VerticalOptions="Center"> <VerticalStackLayout VerticalOptions="Center">
@ -24,10 +25,13 @@
Margin="0, 5, 0, 5" Margin="0, 5, 0, 5"
Padding="3"> Padding="3">
<Entry Placeholder="IBAN" <Entry
HorizontalOptions="Center" Text="FR "
WidthRequest="280" Placeholder="IBAN (FR)"
x:Name="IBAN"/> HorizontalOptions="Center"
WidthRequest="280"
x:Name="IBAN"
Keyboard="Numeric"/>
</Frame> </Frame>
@ -40,7 +44,8 @@
<Entry Placeholder="Montant" <Entry Placeholder="Montant"
HorizontalOptions="Center" HorizontalOptions="Center"
WidthRequest="280" WidthRequest="280"
x:Name="Sum"/> x:Name="Sum"
Keyboard="Numeric"/>
</Frame> </Frame>
@ -49,8 +54,7 @@
Margin="0, 75, 0, 0" Margin="0, 75, 0, 0"
MinimumHeightRequest="80" MinimumHeightRequest="80"
WidthRequest="300" WidthRequest="300"
MaximumWidthRequest="400" MaximumWidthRequest="400"/>
/>
</VerticalStackLayout> </VerticalStackLayout>

@ -1,4 +1,6 @@
using Banquale.Model; using Banquale.Model;
using Microsoft.Maui.Controls;
namespace Banquale.Views.Transfer; namespace Banquale.Views.Transfer;
public partial class RequestPage : ContentPage public partial class RequestPage : ContentPage
@ -8,12 +10,11 @@ public partial class RequestPage : ContentPage
public RequestPage() public RequestPage()
{ {
InitializeComponent(); InitializeComponent();
} }
public async void Send_Clicked(Object sender, EventArgs e) public async void Send_Clicked(Object sender, EventArgs e)
{ {
Account.DoRequest(Name, IBAN, Sum); Account.DoRequest(Name, IBAN, Sum);
await Shell.Current.GoToAsync("//balance"); await Shell.Current.GoToAsync("//balance");
} }
} }

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.Transfer.RibPage"> x:Class="Banquale.Views.Transfer.RibPage"
Title="RIB">
<VerticalStackLayout> <VerticalStackLayout>

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.Transfer.TransferPage"> x:Class="Banquale.Views.Transfer.TransferPage"
Title="Envoyer de l'argent">
<VerticalStackLayout VerticalOptions="Center"> <VerticalStackLayout VerticalOptions="Center">
@ -24,10 +25,13 @@
Margin="0, 5, 0, 5" Margin="0, 5, 0, 5"
Padding="3"> Padding="3">
<Entry Placeholder="IBAN" <Entry
HorizontalOptions="Center" Text="FR "
WidthRequest="280" Placeholder="IBAN"
x:Name="IBAN"/> HorizontalOptions="Center"
WidthRequest="280"
x:Name="IBAN"
Keyboard="Numeric"/>
</Frame> </Frame>
@ -40,7 +44,8 @@
<Entry Placeholder="Montant" <Entry Placeholder="Montant"
HorizontalOptions="Center" HorizontalOptions="Center"
WidthRequest="280" WidthRequest="280"
x:Name="Sum"/> x:Name="Sum"
Keyboard="Numeric"/>
</Frame> </Frame>

Loading…
Cancel
Save