avancement et uniformisation des vues desktop

UI_Windows
Nicolas MAYE 2 years ago
parent f48f3d580a
commit 51e8b4651b

@ -5,7 +5,7 @@
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/> <RowDefinition Height="5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -16,12 +16,23 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Text="Planifier une échéance" BackgroundColor="{StaticResource Primary}" TextColor="{StaticResource Secondary}" Grid.Column="0" Grid.Row="0" Clicked="Button_Clicked" ></Button>
<Button Text="Supprimer une planification" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource Secondary}" Grid.Column="1" Grid.Row="0" Clicked="Button_Clicked_1"></Button> <Button
Clicked="Button_Clicked"
Grid.Column="0" Grid.Row="0"
x:Name="AddCredit"
Text="Effectuer un crédit"
Style="{StaticResource WindowsButton}"/>
<Button
Clicked="Button_Clicked_1"
Grid.Column="1" Grid.Row="0"
x:Name="RetireOperation"
Text="Retirer une opération"
Style="{StaticResource WindowsButton}"/>
<ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="15" x:Name="windowAjout"> <ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="15" x:Name="windowAjout">
<Grid BackgroundColor="{StaticResource Yellow300Accent}"> <Grid BackgroundColor="{StaticResource Yellow300Accent}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -48,7 +59,7 @@
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" /> <Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" />
<ListView Grid.Row="1" Grid.ColumnSpan="5" Grid.RowSpan="6" BackgroundColor="Aqua" ItemsSource="{Binding listTest}"> <ListView Grid.Row="1" Grid.ColumnSpan="5" Grid.RowSpan="6" ItemsSource="{Binding Mgr}">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate> <DataTemplate>
<ViewCell> <ViewCell>
@ -60,7 +71,8 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="leclerc" Grid.Column="0" TextColor="{StaticResource Tertiary}" />
<Label Text="{Binding Nom}" Grid.Column="0" TextColor="{StaticResource Tertiary}" />
<Label Text="12/12/2022" Grid.Column="1" TextColor="{StaticResource Secondary}" /> <Label Text="12/12/2022" Grid.Column="1" TextColor="{StaticResource Secondary}" />
<Label Text="CB" Grid.Column="2" TextColor="{StaticResource Secondary}" /> <Label Text="CB" Grid.Column="2" TextColor="{StaticResource Secondary}" />
<Label Text="Alimentation" Grid.Column="3" TextColor="{StaticResource Secondary}" /> <Label Text="Alimentation" Grid.Column="3" TextColor="{StaticResource Secondary}" />

@ -1,24 +1,22 @@
using Microsoft.Maui.Controls.Internals; using Microsoft.Maui.Controls.Internals;
using Model; using Model;
using static AndroidX.ConstraintLayout.Core.Motion.Utils.HyperSpline;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_Planification : ContentView public partial class CV_Planification : ContentView
{ {
//pour test sur la listView en attendant le stub ou la pers
public List<Compte> listTest = new List<Compte>();
public Manager Mgr => (App.Current as App).Manager;
public CV_Planification() public CV_Planification()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = this;
}
}
private void Button_Clicked(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {

@ -0,0 +1,42 @@
<?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="IHM.Desktop.CV_credit">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,19 @@
namespace IHM.Desktop;
public partial class CV_credit : ContentView
{
public CV_credit()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
}
private void Button_Clicked_1(object sender, EventArgs e)
{
}
}

@ -0,0 +1,42 @@
<?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="IHM.Desktop.CV_debit">
<Grid BackgroundColor="{StaticResource Primary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,19 @@
namespace IHM.Desktop;
public partial class CV_debit : ContentView
{
public CV_debit()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
}
private void Button_Clicked_1(object sender, EventArgs e)
{
}
}

@ -0,0 +1,15 @@
namespace IHM.Desktop;
public class CV_retirer : ContentView
{
public CV_retirer()
{
Content = new VerticalStackLayout
{
Children = {
new Label { HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, Text = "Welcome to .NET MAUI!"
}
}
};
}
}

@ -0,0 +1,43 @@
<?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="IHM.Desktop.CV_retirer">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,19 @@
namespace IHM.Desktop;
public partial class CV_retirer : ContentView
{
public CV_retirer()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
}
private void Button_Clicked_1(object sender, EventArgs e)
{
}
}

@ -2,36 +2,103 @@
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView 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="IHM.Desktop.Operations" x:Class="IHM.Desktop.Operations"
BackgroundColor="{StaticResource Yellow300Accent}"> >
<VerticalStackLayout Margin="20">
<Label
Style="{StaticResource TitreWindows}"
Text="OPERATION"
VerticalOptions="StartAndExpand"/>
<HorizontalStackLayout HorizontalOptions="Center"> <Grid>
<Button <Grid.RowDefinitions>
<RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!-- <Button Text="Planifier une échéance" BackgroundColor="{StaticResource Primary}" TextColor="{StaticResource Secondary}" Grid.Column="0" Grid.Row="0" Clicked="Button_Clicked" ></Button>
<Button Text="Supprimer une planification" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource Secondary}" Grid.Column="1" Grid.Row="0" Clicked="Button_Clicked_1"></Button>
<Button Text="Supprimer une planification" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource Secondary}" Grid.Column="2" Grid.Row="0" Clicked="Button_Clicked_1"></Button>
<Button Text="Supprimer une planification" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource Secondary}" Grid.Column="3" Grid.Row="0" Clicked="Button_Clicked_1"></Button>
-->
<Button
Clicked="AddCredit_Clicked"
Grid.Column="0" Grid.Row="0"
x:Name="AddCredit" x:Name="AddCredit"
Text="Effectuer un crédit" Text="Effectuer un crédit"
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<Button <Button
Clicked="RetireOperation_Clicked"
Grid.Column="1" Grid.Row="0"
x:Name="RetireOperation" x:Name="RetireOperation"
Text="Retirer une opération" Text="Retirer une opération"
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<Button <Button
Clicked="AddDebit_Clicked"
Grid.Column="2" Grid.Row="0"
x:Name="AddDebit" x:Name="AddDebit"
Text="effectuer un débit" Text="effectuer un débit"
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<Button <Button
Clicked="DelOperation_Clicked"
Grid.Column="3" Grid.Row="0"
x:Name="DelOperation" x:Name="DelOperation"
Text="Supprimer une opération" Text="Supprimer une opération"
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
</HorizontalStackLayout>
</VerticalStackLayout>
<ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="15" x:Name="windowAjout">
<Grid BackgroundColor="{StaticResource Yellow300Accent}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Grid>
</ContentView>
</Grid>
</ContentView> </ContentView>

@ -6,4 +6,26 @@ public partial class Operations : ContentView
{ {
InitializeComponent(); InitializeComponent();
} }
private void AddCredit_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_credit();
}
private void RetireOperation_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_retirer();
}
private void AddDebit_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_debit();
}
private void DelOperation_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_debit();
}
} }

@ -60,6 +60,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Desktop\CV_retirer.cs" />
<Compile Remove="Desktop\Planification.xaml.cs" /> <Compile Remove="Desktop\Planification.xaml.cs" />
</ItemGroup> </ItemGroup>
@ -110,12 +111,21 @@
<MauiXaml Update="Desktop\CV_AddPlanification.xaml"> <MauiXaml Update="Desktop\CV_AddPlanification.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Desktop\CV_credit.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_debit.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_DeletePlanification.xaml"> <MauiXaml Update="Desktop\CV_DeletePlanification.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Desktop\CV_Planification.xaml"> <MauiXaml Update="Desktop\CV_Planification.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Desktop\CV_retirer.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_Statistiques.xaml"> <MauiXaml Update="Desktop\CV_Statistiques.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -406,7 +406,7 @@
<Style TargetType="Button" x:Key="WindowsButton"> <Style TargetType="Button" x:Key="WindowsButton">
<Setter Property="TextColor" Value="Black"/> <Setter Property="TextColor" Value="Black"/>
<Setter Property="Margin" Value="20"/> <Setter Property="Margin" Value="10"/>
<Setter Property="CornerRadius" Value="20"/> <Setter Property="CornerRadius" Value="20"/>
<Setter Property="BorderWidth" Value="1"/> <Setter Property="BorderWidth" Value="1"/>
<Setter Property="BorderColor" Value="Black"/> <Setter Property="BorderColor" Value="Black"/>
@ -416,7 +416,7 @@
<Style TargetType="Border" x:Key="TotalButton"> <Style TargetType="Border" x:Key="TotalButton">
<Setter Property="StrokeThickness" Value="1"/> <Setter Property="StrokeThickness" Value="1"/>
<Setter Property="Padding" Value="250,8"/> <Setter Property="Padding" Value="200,8"/>
<Setter Property="StrokeShape" Value="RoundRectangle 10,10,10,10"/> <Setter Property="StrokeShape" Value="RoundRectangle 10,10,10,10"/>
<Setter Property="Stroke" Value="Black"/> <Setter Property="Stroke" Value="Black"/>
</Style> </Style>

Loading…
Cancel
Save