parent
45b220c477
commit
0ecb82b5ce
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="IHM.Composant.BanqueDispo">
|
||||
|
||||
<Border StrokeShape="RoundRectangle 20" BackgroundColor="{StaticResource Tertiary}" Padding="20">
|
||||
<VerticalStackLayout>
|
||||
<Image Source="{Binding ImageBanque}"/>
|
||||
<Button Text="CHOISIR" Clicked="Banque_Clicked"/>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</ViewCell>
|
@ -0,0 +1,23 @@
|
||||
namespace IHM.Composant;
|
||||
|
||||
public partial class BanqueDispo : ViewCell
|
||||
{
|
||||
public BanqueDispo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static readonly BindableProperty ImageBanqueProperty =
|
||||
BindableProperty.Create("ImageBanque", typeof(string), typeof(BanqueDispo), "");
|
||||
|
||||
public string ImageBanque
|
||||
{
|
||||
get { return (string)GetValue(ImageBanqueProperty); }
|
||||
set { SetValue(ImageBanqueProperty, value); }
|
||||
}
|
||||
|
||||
private void Banque_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="IHM.Composant.BanqueVC"
|
||||
x:Name="root">
|
||||
|
||||
<FlexLayout Direction="Row" AlignItems="Center" JustifyContent="SpaceAround">
|
||||
|
||||
<Label Text="{Binding NomBanque}" FontAttributes="Bold" FontSize="Body"/>
|
||||
<Label Text="{Binding DateLastReload}" FontAttributes="Italic" FontSize="Body"/>
|
||||
<ImageButton Source="reload_banks.png"
|
||||
Padding="10" Margin="10"
|
||||
CornerRadius="10" HeightRequest="65"
|
||||
BackgroundColor="{StaticResource Primary}"
|
||||
Clicked="MaBanque_Clicked"/>
|
||||
|
||||
</FlexLayout>
|
||||
</ViewCell>
|
@ -0,0 +1,32 @@
|
||||
namespace IHM.Composant;
|
||||
|
||||
public partial class BanqueVC : ViewCell
|
||||
{
|
||||
public BanqueVC()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static readonly BindableProperty NomBanqueProperty =
|
||||
BindableProperty.Create("NomBanque", typeof(string), typeof(BanqueVC), "");
|
||||
|
||||
public string NomBanque
|
||||
{
|
||||
get { return (string)GetValue(NomBanqueProperty); }
|
||||
set { SetValue(NomBanqueProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly BindableProperty DateLastReloadProperty =
|
||||
BindableProperty.Create("DateLastReload", typeof(string), typeof(BanqueVC), "");
|
||||
|
||||
public string DateLastReload
|
||||
{
|
||||
get { return (string)GetValue(DateLastReloadProperty); }
|
||||
set { SetValue(DateLastReloadProperty, value); }
|
||||
}
|
||||
|
||||
private void MaBanque_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?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:composant="clr-namespace:IHM.Composant"
|
||||
x:Class="IHM.Mobile.AjoutBanques"
|
||||
Title="AjoutBanques">
|
||||
<VerticalStackLayout>
|
||||
<Label Text="Liste des Banques" FontAttributes="Bold" FontSize="Body" HorizontalOptions="Center"/>
|
||||
<CollectionView>
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<composant:BanqueDispo ImageBanque="bla.png" />
|
||||
<!-- il faut le namespace !!!! -->
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
@ -0,0 +1,9 @@
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class AjoutBanques : ContentPage
|
||||
{
|
||||
public AjoutBanques()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?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.ErrorPage"
|
||||
Title="Error">
|
||||
<FlexLayout Direction="Column" JustifyContent="Center" AlignItems="Center">
|
||||
|
||||
<Image Source="{AppThemeBinding Light=logo_sans_fond_black.png, Dark=logo_sans_fond.png}"
|
||||
HorizontalOptions="Center" HeightRequest="200"/>
|
||||
|
||||
<ActivityIndicator IsRunning="true" Margin="0,120,0,0" />
|
||||
|
||||
<Label Text="Tentative de connexion" Margin="0,20,0,0" FontSize="Body" FontAttributes="Bold"/>
|
||||
|
||||
</FlexLayout>
|
||||
</ContentPage>
|
@ -0,0 +1,46 @@
|
||||
using Model;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class ErrorPage : ContentPage
|
||||
{
|
||||
public Manager Mgr => (App.Current as App).Manager;
|
||||
|
||||
public const int TIME_TEST_DB = 15000;
|
||||
|
||||
public ErrorPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
startTestConnexion();
|
||||
}
|
||||
|
||||
protected override bool OnBackButtonPressed()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void conIsActive()
|
||||
{
|
||||
while (!Mgr.testConnexionAsDatabase())
|
||||
{
|
||||
Thread.Sleep(TIME_TEST_DB);
|
||||
}
|
||||
|
||||
ConnexionValide();
|
||||
return;
|
||||
}
|
||||
|
||||
public void startTestConnexion()
|
||||
{
|
||||
Task testConnexion = new Task(() => conIsActive());
|
||||
testConnexion.Start();
|
||||
}
|
||||
|
||||
private async void ConnexionValide()
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
<?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:composant="clr-namespace:IHM.Composant"
|
||||
x:Class="IHM.Mobile.GestionBanques"
|
||||
Title="GestionBanques">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.10*"/>
|
||||
<RowDefinition Height="0.05*"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<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="reload_banks.png"
|
||||
HorizontalOptions="End" Padding="10" Margin="10"
|
||||
CornerRadius="10" HeightRequest="65"
|
||||
BackgroundColor="{StaticResource Primary}"/>
|
||||
|
||||
<ImageButton Grid.Row="0" Grid.Column="2" Source="reload_banks.png"
|
||||
HorizontalOptions="End" Padding="10" Margin="10"
|
||||
CornerRadius="10" HeightRequest="65"
|
||||
BackgroundColor="{StaticResource Primary}"/>
|
||||
|
||||
<Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste des Banques disponibles : " FontAttributes="Bold" FontSize="Body" Padding="20,5,0,0"/>
|
||||
|
||||
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding BanquesDisponibleInApp}">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<composant:BanqueVC NomBanque="{Binding Nom}" DateLastReload="12/12/2003" /><!-- il faut le namespace !!!! -->
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -0,0 +1,16 @@
|
||||
using Model;
|
||||
|
||||
namespace IHM.Mobile;
|
||||
|
||||
public partial class GestionBanques : ContentPage
|
||||
{
|
||||
public Manager Mgr => (App.Current as App).Manager;
|
||||
|
||||
public GestionBanques()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext= Mgr;
|
||||
//Mgr.BanquesDisponibleInApp=Mgr.importBanques();
|
||||
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 551 B |
Loading…
Reference in new issue