Merge pull request 'add navigation Shell' (#23) from xaml/views into master
continuous-integration/drone/push Build is passing Details

Reviewed-on: #23
pull/30/head
Antoine PEREDERII 2 years ago
commit 96eb327568

@ -13,9 +13,9 @@ public partial class App : Application
public App()
{
MyManager.ChargeDonnee();
MyManager.Persistance = new DataContractPersistance.DataContractPers();
MyManager.SauvegardeDonnee();
//MyManager.ChargeDonnee();
//MyManager.Persistance = new DataContractPersistance.DataContractPers();
//MyManager.SauvegardeDonnee();
InitializeComponent();

@ -8,47 +8,40 @@
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False">
<!--<ShellContent
Title="Connection"
ContentTemplate="{DataTemplate views:ConnectionPage}"
Route="connection" />-->
<TabBar>
<Tab Icon="home.png"
Title="Compte">
<ShellContent
Title="Solde"
ContentTemplate="{DataTemplate views:BalancePage}"
Route="Views" />
</Tab>
<Tab Icon="transactions.png"
Title="Transactions">
<ShellContent ContentTemplate="{DataTemplate views:ConnectionPage}"
Route="connection"/>
<ShellContent
Title="Solde"
ContentTemplate="{DataTemplate views:MenuTransferPage}"
Route="Views" />
</Tab>
<Tab Icon="help.png"
Title="Aide">
<TabBar>
<ShellContent
Title="Help"
ContentTemplate="{DataTemplate views:HelpPage}"
Route="Views" />
<ShellContent
Title="Solde"
ContentTemplate="{DataTemplate views:BalancePage}"
Route="balance"
Icon="home.png"/>
</Tab>
<ShellContent
Title="Transactions"
ContentTemplate="{DataTemplate views:MenuTransferPage}"
Route="menu"
Icon="transactions.png"/>
<Tab Icon="accounts.png"
Title="Compte">
<ShellContent
Title="Aide"
ContentTemplate="{DataTemplate views:HelpPage}"
Route="help"
Icon="help.png"/>
<ShellContent
Title="Categorie"
ContentTemplate="{DataTemplate views:CategoryPage}"
Route="Views" />
</Tab>
Title="Compte"
ContentTemplate="{DataTemplate views:SwitchAccountPage}"
Route="account"
Icon="accounts.png"/>
</TabBar>

@ -1,10 +1,18 @@
namespace Banquale;
using Banquale.Views;
namespace Banquale;
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
Routing.RegisterRoute("balance/categorydetails", typeof(CategoryPage));
Routing.RegisterRoute("newpagedetails", typeof(NewPage1));
//Routing.RegisterRoute("menu/requestdetails", typeof(RequestPage));
//Routing.RegisterRoute("menu/ribdetails", typeof(RibPage));
//Routing.RegisterRoute("menu/transferdetails", typeof(TransferPage));
}
}

@ -37,7 +37,8 @@
TextColor="Black"
MinimumHeightRequest="75"
Margin="10,75,10,0"
FontSize="Large"/>
FontSize="Large"
Clicked="Connection_Clicked"/>
</StackLayout>

@ -6,4 +6,10 @@ public partial class ConnectionPage : ContentPage
{
InitializeComponent();
}
public async void Connection_Clicked(Object sender, EventArgs e)
{
await Shell.Current.GoToAsync("///balance");
}
}

@ -9,6 +9,6 @@ public partial class HelpPage : ContentPage
public async void Send_Clicked(Object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new BalancePage());
await Shell.Current.GoToAsync("//balance");
}
}

@ -7,19 +7,19 @@ public partial class MenuTransferPage : ContentPage
InitializeComponent();
}
public async void RIB_Clicked(Object sender, EventArgs e)
public async void RIB_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new RibPage());
await Shell.Current.Navigation.PushAsync(new RibPage());
}
public async void Request_Clicked(System.Object sender, System.EventArgs e)
public async void Request_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new RequestPage());
await Shell.Current.Navigation.PushAsync(new RequestPage());
}
public async void Transfer_Clicked(System.Object sender, System.EventArgs e)
public async void Transfer_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new TransferPage());
await Shell.Current.Navigation.PushAsync(new TransferPage());
}
}

@ -46,7 +46,8 @@
Margin="0, 75, 0, 0"
MinimumHeightRequest="80"
WidthRequest="300"
MaximumWidthRequest="400"/>
MaximumWidthRequest="400"
/>
</VerticalStackLayout>

@ -6,4 +6,10 @@ public partial class RequestPage : ContentPage
{
InitializeComponent();
}
//public async void Send_Clicked(Object sender, EventArgs e)
//{
// await Shell.Current.GoToAsync("//balance");
//}
}

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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">
@ -16,7 +16,8 @@
</Style>
</ContentView.Resources>
<Button Text=" Compte Personnel &#x0a; Mme Tatouille "/>
<Button Text=" Compte Personnel &#x0a; Mme Tatouille "
Clicked="Transfer_Clicked"/>
<!-- &#x0a; sert à faire un retour à la ligne-->
</ContentView>

@ -6,4 +6,10 @@ public partial class SwitchAccountView : ContentView
{
InitializeComponent();
}
public async void Transfer_Clicked(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("///connection");
}
}

@ -46,7 +46,8 @@
Margin="0, 75, 0, 0"
MinimumHeightRequest="80"
WidthRequest="300"
MaximumWidthRequest="400"/>
MaximumWidthRequest="400"
Clicked="Send_Clicked"/>
</VerticalStackLayout>

@ -6,4 +6,10 @@ public partial class TransferPage : ContentPage
{
InitializeComponent();
}
}
public async void Send_Clicked(Object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//balance");
}
}
Loading…
Cancel
Save