xaml-C#/data-binding #46
Merged
antoine.perederii
merged 21 commits from xaml-C#/data-binding
into master
2 years ago
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,9 +0,0 @@
|
||||
<maui:MauiWinUIApplication
|
||||
x:Class="Banquale.WinUI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:maui="using:Microsoft.Maui"
|
||||
xmlns:local="using:Banquale.WinUI">
|
||||
|
||||
</maui:MauiWinUIApplication>
|
||||
|
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
IgnorableNamespaces="uap rescap">
|
||||
|
||||
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="E6D0BE1C-147D-42F4-B015-111470775E25" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>$placeholder$</DisplayName>
|
||||
<PublisherDisplayName>User Name</PublisherDisplayName>
|
||||
<Logo>$placeholder$.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
|
||||
<uap:VisualElements
|
||||
DisplayName="$placeholder$"
|
||||
Description="$placeholder$"
|
||||
Square150x150Logo="$placeholder$.png"
|
||||
Square44x44Logo="$placeholder$.png"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
|
||||
<uap:SplashScreen Image="$placeholder$.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
</Capabilities>
|
||||
|
||||
</Package>
|
||||
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="Banquale.WinUI.app"/>
|
||||
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<!-- The combination of below two tags have the following effect:
|
||||
1) Per-Monitor for >= Windows 10 Anniversary Update
|
||||
2) System < Windows 10 Anniversary Update
|
||||
-->
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 191 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
@ -1,151 +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"
|
||||
xmlns:local="clr-namespace:Banquale.Views.Balance"
|
||||
xmlns:model="clr-namespace:Banquale.Model"
|
||||
x:Class="Banquale.Views.Balance.BalancePage"
|
||||
Title="BalancePage"
|
||||
Shell.NavBarIsVisible="False">
|
||||
|
||||
<Grid RowDefinitions="auto, *">
|
||||
<Grid BackgroundColor="Beige"
|
||||
HorizontalOptions="Center"
|
||||
HeightRequest="100"
|
||||
MaximumHeightRequest="150"
|
||||
WidthRequest="230"
|
||||
RowDefinitions="auto, 35, *"
|
||||
ColumnDefinitions="250, auto"
|
||||
Grid.Row="0"
|
||||
Margin="30">
|
||||
|
||||
<Label
|
||||
Text="Compte Professionnel"
|
||||
HorizontalOptions="Center"
|
||||
Margin="0, 15, 0, 0"/>
|
||||
|
||||
<HorizontalStackLayout
|
||||
Grid.Row="1"
|
||||
HorizontalOptions="Center">
|
||||
|
||||
<Label
|
||||
Text="{Binding CustomersList[0].Name}"
|
||||
Margin="0, 0, 5, 0"/>
|
||||
|
||||
<Label
|
||||
Text="{Binding CustomersList[0].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 CustomersList[0].AccountsList[0].Balance} "
|
||||
Grid.Column="1"
|
||||
Margin="50, 0, 5, 0"/>
|
||||
|
||||
<Label Text="€"
|
||||
Grid.Column="2"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<ScrollView
|
||||
Grid.Row="1">
|
||||
<FlexLayout JustifyContent="Center"
|
||||
AlignItems="Start"
|
||||
AlignContent="Start"
|
||||
Direction="Row"
|
||||
Wrap="Wrap">
|
||||
|
||||
<Button Text="NewPage1"
|
||||
Clicked="OnButtonClicked"
|
||||
MinimumWidthRequest="250"/>
|
||||
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView />
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView />
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView />
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView />
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
<local:BalanceView/>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -1,41 +0,0 @@
|
||||
<?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="Banquale.Views.Balance.BalanceView">
|
||||
<VerticalStackLayout>
|
||||
<BoxView BackgroundColor="Black"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
HeightRequest="1.3"
|
||||
Margin="20, 0, 20, 0"/>
|
||||
<Grid
|
||||
ColumnDefinitions="40, 3*, *"
|
||||
Margin="20, 5, 20, 5"
|
||||
HorizontalOptions="Fill">
|
||||
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Tapped="OnButtonClicked"
|
||||
NumberOfTapsRequired="1" />
|
||||
</Grid.GestureRecognizers>
|
||||
|
||||
<Image Source="dotnet_bot.png"
|
||||
Grid.Column="0"
|
||||
MaximumHeightRequest="30"/>
|
||||
<Label
|
||||
Text="Depense"
|
||||
Grid.Column="1"
|
||||
VerticalOptions="Center"
|
||||
Margin="10, 0, 0, 0"/>
|
||||
<Label
|
||||
Text="Prix"
|
||||
Grid.Column="2"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="End"
|
||||
Margin="0, 0, 20, 0"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ContentView>
|
||||
|
@ -0,0 +1,109 @@
|
||||
<?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"
|
||||
xmlns:local="clr-namespace:Banquale.Views"
|
||||
xmlns:model="clr-namespace:Banquale.Model"
|
||||
x:Class="Banquale.Views.BalancePage"
|
||||
Title="BalancePage"
|
||||
Shell.NavBarIsVisible="False">
|
||||
|
||||
<Grid RowDefinitions="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
|
||||
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>
|
||||
|
||||
<ListView ItemsSource="{Binding TransactionsList}" Grid.Row="1"
|
||||
SelectionMode="None">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate>
|
||||
|
||||
<ViewCell>
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="40, 3*, *"
|
||||
Margin="20, 5, 20, 5"
|
||||
HorizontalOptions="Fill">
|
||||
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Tapped="Transaction_Clicked"
|
||||
NumberOfTapsRequired="1" />
|
||||
|
||||
</Grid.GestureRecognizers>
|
||||
|
||||
<Image Source="dotnet_bot.png"
|
||||
Grid.Column="0"
|
||||
MaximumHeightRequest="30"/>
|
||||
<Label
|
||||
Text="{Binding Date, StringFormat='{0:ddd dd MMM yyyy}'}"
|
||||
Grid.Column="1"
|
||||
VerticalOptions="Center"
|
||||
Margin="10, 0, 0, 0"/>
|
||||
<Label
|
||||
Text="{Binding Sum, StringFormat='{0} €'}"
|
||||
Grid.Column="2"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="End"
|
||||
Margin="0, 0, 20, 0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ViewCell>
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
</ListView.ItemTemplate>
|
||||
|
||||
</ListView>
|
||||
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -1,14 +1,40 @@
|
||||
using Banquale.Model;
|
||||
|
||||
namespace Banquale.Views;
|
||||
|
||||
public partial class ConnectionPage : ContentPage
|
||||
{
|
||||
public ConnectionPage()
|
||||
public Manager Mgr => (App.Current as App).MyManager;
|
||||
public ConnectionPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public async void Connection_Clicked(Object sender, EventArgs e)
|
||||
{
|
||||
string currentId = ident.Text;
|
||||
string password = pass.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(currentId) || string.IsNullOrWhiteSpace(password))
|
||||
{
|
||||
await DisplayAlert("Erreur", "Tout les champs doivent être complétés", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
if(currentId == "1")
|
||||
{
|
||||
await Navigation.PushModalAsync(new ConsultantHomePage());
|
||||
return;
|
||||
}
|
||||
|
||||
//if(int.Parse(currentId) in Mgr.CustomersList) // FONCTIONNE PAS
|
||||
//{
|
||||
// Mgr.SelectedCustomer = Mgr.CustomersList[int.Parse(currentId)];
|
||||
//}
|
||||
|
||||
Mgr.SelectedCustomer = Mgr.CustomersList[0]; // 0 à changer
|
||||
|
||||
|
||||
await Navigation.PushModalAsync(new SwitchAccountPage());
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,44 @@
|
||||
<?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"
|
||||
xmlns:local="clr-namespace:Banquale.Views"
|
||||
x:Class="Banquale.Views.ConsultantHomePage"
|
||||
Title="ConsultantHomePage"
|
||||
Shell.NavBarIsVisible="False">
|
||||
|
||||
|
||||
<StackLayout
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center">
|
||||
|
||||
<Button Text="Acceder à un compte"
|
||||
MinimumHeightRequest="65"
|
||||
FontSize="Large"
|
||||
Margin="0, 10, 0, 10"
|
||||
Clicked="Id_Clicked"/>
|
||||
|
||||
<Button Text="Creer un client"
|
||||
MinimumHeightRequest="65"
|
||||
FontSize="Large"
|
||||
Margin="0, 10, 0, 10"
|
||||
Clicked="Create_Customer_Clicked"/>
|
||||
|
||||
<Button Text="Messages"
|
||||
MinimumHeightRequest="65"
|
||||
FontSize="Large"
|
||||
Margin="0, 10, 0, 10"
|
||||
Clicked="Message_Clicked"/>
|
||||
|
||||
|
||||
<Button Text="Déconnexion"
|
||||
BorderWidth="2"
|
||||
HorizontalOptions="Fill"
|
||||
MinimumHeightRequest="100"
|
||||
MinimumWidthRequest="375"
|
||||
Margin="10,65,0,0"
|
||||
FontSize="Large"
|
||||
Clicked="DisconnectionClicked"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</ContentPage>
|
@ -0,0 +1,33 @@
|
||||
namespace Banquale.Views;
|
||||
|
||||
public partial class ConsultantHomePage : ContentPage
|
||||
{
|
||||
public ConsultantHomePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
async void DisconnectionClicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("///connection");
|
||||
}
|
||||
|
||||
async void Id_Clicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new ConsultantIdPage());
|
||||
//await Shell.Current.GoToAsync("..");
|
||||
}
|
||||
|
||||
async void Create_Customer_Clicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new CreateCustomerPage());
|
||||
//await Shell.Current.GoToAsync("///createcustomer");
|
||||
}
|
||||
|
||||
async void Message_Clicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new MessageListPage());
|
||||
//await Shell.Current.GoToAsync("///createcustomer");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?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="Banquale.Views.ConsultantIdPage"
|
||||
Title="ConsultantIdPage">
|
||||
|
||||
<VerticalStackLayout VerticalOptions="Center">
|
||||
|
||||
<Frame CornerRadius="20" Margin="20, 150, 20, 0">
|
||||
|
||||
<Entry
|
||||
Placeholder="Identifiant"
|
||||
MaxLength="20"
|
||||
MinimumWidthRequest="275"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"
|
||||
FontSize="Large"
|
||||
Keyboard="Numeric"
|
||||
x:Name="ident"/>
|
||||
|
||||
</Frame>
|
||||
|
||||
<Button
|
||||
Text="Se connecter"
|
||||
BorderWidth="2"
|
||||
HorizontalOptions="Fill"
|
||||
MinimumHeightRequest="100"
|
||||
Margin="10, 100, 10, 0"
|
||||
FontSize="Large"
|
||||
Clicked="Connection_Clicked"/>
|
||||
|
||||
</VerticalStackLayout>
|
||||
|
||||
</ContentPage>
|
@ -0,0 +1,24 @@
|
||||
using Banquale.Views;
|
||||
namespace Banquale.Views;
|
||||
|
||||
public partial class ConsultantIdPage : ContentPage
|
||||
{
|
||||
public ConsultantIdPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public async void Connection_Clicked(Object sender, EventArgs e)
|
||||
{
|
||||
string id = ident.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
await DisplayAlert("Erreur", "l'id ne doit pas être nulle", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
await Navigation.PushModalAsync(new BalancePage());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?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="Banquale.Views.CreateCustomerPage"
|
||||
Title="CreateCustomerPage">
|
||||
|
||||
<StackLayout Margin="20">
|
||||
|
||||
<Label Text="Informations du client" FontSize="Title" HorizontalOptions="Center" Margin="0,0,0,20" />
|
||||
|
||||
<Label Text="ID client" FontSize="Subtitle" />
|
||||
<Entry x:Name="clientIdEntry" Placeholder="Entrez l'ID client" />
|
||||
|
||||
<Label Text="Nom" FontSize="Subtitle" />
|
||||
<Entry x:Name="clientLastNameEntry" Placeholder="Entrez le nom" />
|
||||
|
||||
<Label Text="Prénom" FontSize="Subtitle" />
|
||||
<Entry x:Name="clientFirstNameEntry" Placeholder="Entrez le prénom" />
|
||||
|
||||
<Button Text="Enregistrer" HorizontalOptions="Center" Margin="0,20,0,0" />
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</ContentPage>
|
@ -0,0 +1,52 @@
|
||||
<?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="Banquale.Views.MessageListPage"
|
||||
Title="MessageListPage"
|
||||
Shell.NavBarIsVisible="True">
|
||||
|
||||
<VerticalStackLayout>
|
||||
|
||||
<ListView ItemsSource="{Binding MessagesList}"
|
||||
SelectionMode="None">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate>
|
||||
|
||||
<ViewCell>
|
||||
|
||||
<VerticalStackLayout>
|
||||
|
||||
<!--<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Tapped="Transaction_Clicked"
|
||||
NumberOfTapsRequired="1" />
|
||||
|
||||
</Grid.GestureRecognizers>-->
|
||||
|
||||
<Image Source="dotnet_bot.png"
|
||||
Grid.Column="0"
|
||||
MaximumHeightRequest="30"/>
|
||||
<Label
|
||||
Text="{Binding Subject}"
|
||||
VerticalOptions="Center"
|
||||
Margin="10, 0, 0, 0"/>
|
||||
<Label
|
||||
Text="{Binding Description}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="End"
|
||||
Margin="0, 0, 20, 0"/>
|
||||
|
||||
</VerticalStackLayout>
|
||||
|
||||
</ViewCell>
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
</ListView.ItemTemplate>
|
||||
|
||||
</ListView>
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
@ -1,14 +0,0 @@
|
||||
<?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="Banquale.Views.SwitchAccountView">
|
||||
|
||||
<VerticalStackLayout>
|
||||
|
||||
<Button Text=" Compte Personnel 
 Mme Tatouille "
|
||||
Clicked="Transfer_Clicked"/>
|
||||
<!-- 
 sert à faire un retour à la ligne-->
|
||||
|
||||
</VerticalStackLayout>
|
||||
|
||||
</ContentView>
|
@ -1,15 +0,0 @@
|
||||
namespace Banquale.Views;
|
||||
|
||||
public partial class SwitchAccountView : ContentView
|
||||
{
|
||||
public SwitchAccountView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public async void Transfer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//balance");
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,24 @@
|
||||
using Banquale.Model;
|
||||
using Banquale.Views.Category;
|
||||
namespace Banquale.Views;
|
||||
|
||||
public partial class TransactionsPage : ContentPage
|
||||
{
|
||||
public TransactionsPage()
|
||||
public Manager Mgr => (App.Current as App).MyManager;
|
||||
public TransactionsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = Mgr.SelectedTransaction;
|
||||
}
|
||||
|
||||
async void Categ_Clicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new CategoryPage());
|
||||
}
|
||||
|
||||
async void Objection_Clicked(System.Object sender, System.EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PopAsync();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue