fav corriger et credits

pull/9/head
Clement LESME 2 years ago
parent 906aebe153
commit 5354ca5106

@ -7,6 +7,7 @@ public partial class App : Application
public Manager Manager { get; private set; } = new Manager(); public Manager Manager { get; private set; } = new Manager();
public App() public App()
{ {
Manager.chargeDonne();
InitializeComponent(); InitializeComponent();
MainPage = new AppShell(); MainPage = new AppShell();

@ -9,16 +9,16 @@
<TabBar> <TabBar>
<ShellContent <ShellContent
Title="truc de base" Title="HomePage"
ContentTemplate="{DataTemplate views:Acceuil}" ContentTemplate="{DataTemplate views:Acceuil}"
Route="MainPage" /> Route="MainPage" />
<ShellContent <ShellContent
Title="Home" Title="Favoris"
ContentTemplate="{DataTemplate local:MainPage}" ContentTemplate="{DataTemplate views:Favoris}"
Route="MainPage" /> Route="MainPage" />
<ShellContent <ShellContent
Title="Fav" Title="Credits"
ContentTemplate="{DataTemplate views:Favoris}" ContentTemplate="{DataTemplate views:Credits}"
Route="MainPage" /> Route="MainPage" />
</TabBar> </TabBar>

@ -48,16 +48,13 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Update="Views\Favoris.xaml.cs">
<DependentUpon>Favoris.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="Views\Acceuil.xaml"> <MauiXaml Update="Views\Acceuil.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Views\Credits.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Favoris.xaml"> <MauiXaml Update="Views\Favoris.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -1,41 +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"
x:Class="CanYouBuildIt.MainPage">
<ScrollView>
<VerticalStackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Center">
<Image
Source="pc1.png"
SemanticProperties.Description="Cute dot net bot waving hi to you!"
HeightRequest="200"
HorizontalOptions="Center" />
<Label
Text="Hello, World!"
SemanticProperties.HeadingLevel="Level1"
FontSize="32"
HorizontalOptions="Center" />
<Label
Text="Welcome to .NET Multi-platform App UI"
SemanticProperties.HeadingLevel="Level2"
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
FontSize="18"
HorizontalOptions="Center" />
<Button
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -1,24 +0,0 @@
namespace CanYouBuildIt;
public partial class MainPage : ContentPage
{
int count = 0;
public MainPage()
{
InitializeComponent();
}
private void OnCounterClicked(object sender, EventArgs e)
{
count++;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
SemanticScreenReader.Announce(CounterBtn.Text);
}
}

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -15,6 +16,13 @@ namespace CanYouBuildIt.Model
listUtil = new List<Utilisateur>(); listUtil = new List<Utilisateur>();
} }
public void chargeDonne()
{
Utilisateur gege =new Utilisateur("gerad","gege");
listUtil.Add(gege);
Console.WriteLine("SJBEVKBV<SBDVK<KBCBJCqCeCsVHQ%LRVKzropjv$ptihujhbgoZRGJ");
}
public void ajouterUtilisateur(Utilisateur utilisateur) public void ajouterUtilisateur(Utilisateur utilisateur)
{ {
listUtil.Add(utilisateur); listUtil.Add(utilisateur);

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -65,7 +65,6 @@
<Button Grid.Row="0" Grid.Column="1" <Button Grid.Row="0" Grid.Column="1"
x:Name="Config" x:Name="Config"
Text="Configurateur" Text="Configurateur"
SemanticProperties.Hint="Counts the number of times you click"
HorizontalOptions="Center" HorizontalOptions="Center"
Clicked="AddUtilisater" Clicked="AddUtilisater"
BackgroundColor="DimGrey" BackgroundColor="DimGrey"
@ -74,12 +73,12 @@
<Button Grid.Row="0" Grid.Column="4" <Button Grid.Row="0" Grid.Column="4"
x:Name="Fav" x:Name="Fav"
Text="Favoris" Text="Favoris"
SemanticProperties.Hint="Counts the number of times you click"
HorizontalOptions="Center" HorizontalOptions="Center"
BackgroundColor="DimGrey" BackgroundColor="DimGrey"
TextColor="Snow"/> TextColor="Snow"/>
</Grid> </Grid>
<Label Text="{Binding name}"></Label>
</VerticalStackLayout> </VerticalStackLayout>
</ContentPage> </ContentPage>

@ -1,4 +1,5 @@
using CanYouBuildIt.Model; using CanYouBuildIt.Model;
using Microsoft.UI.Xaml;
using System.Diagnostics; using System.Diagnostics;
namespace CanYouBuildIt.Views; namespace CanYouBuildIt.Views;

@ -0,0 +1,12 @@
<?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="CanYouBuildIt.Views.Credits"
Title="Credits">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace CanYouBuildIt.Views;
public partial class Credits : ContentPage
{
public Credits()
{
InitializeComponent();
}
}

@ -1,14 +1,13 @@
<?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="CanYouBuildIt.Views.NewContent1" x:Class="CanYouBuildIt.Views.Favoris"
BackgroundColor="White"> Title="Favoris"
BackgroundColor="White">
<VerticalStackLayout Margin="0,15,0,0"> <VerticalStackLayout Margin="0,50,0,0">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="1"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
@ -19,35 +18,35 @@
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Row="0" Grid.Column="0" <Image Grid.Column="0"
Source="pc1.png" Source="pc3.png"
HeightRequest="200" HeightRequest="200"
/> />
<Image Grid.Row="0" Grid.Column="2" <Image Grid.Column="2"
Source="pc3.png" Source="pc3.png"
HeightRequest="200" HeightRequest="200"
/> />
<Image Grid.Row="0" Grid.Column="4" <Image Grid.Column="4"
Source="pc3.png" Source="pc3.png"
HeightRequest="200" HeightRequest="200"
/> />
<Image Grid.Row="1" Grid.Column="1" <Image Grid.Column="1"
Source="pc2.png" Source="pc3.png"
HeightRequest="200" HeightRequest="200"
/> />
<Image Grid.Row="1" Grid.Column="3" <Image Grid.Column="3"
Source="pc4.png" Source="pc3.png"
HeightRequest="200" HeightRequest="200"
/> />
<Image Grid.Row="1" Grid.Column="5" <Image Grid.Column="5"
Source="pc2.png" Source="pc3.png"
HeightRequest="200" HeightRequest="200"
/> />
</Grid> </Grid>
<Grid Margin="0,250"> <Grid Margin="0,100">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="1"/> <RowDefinition Height="1"/>
@ -61,16 +60,15 @@
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="1" <Button Grid.Column="1"
x:Name="Config" x:Name="Config"
Text="Configurateur" Text="Configurateur"
SemanticProperties.Hint="Counts the number of times you click" SemanticProperties.Hint="Counts the number of times you click"
HorizontalOptions="Center" HorizontalOptions="Center"
Clicked="AddUtilisater"
BackgroundColor="DimGrey" BackgroundColor="DimGrey"
TextColor="Snow"/> TextColor="Snow"/>
<Button Grid.Row="0" Grid.Column="4" <Button Grid.Column="4"
x:Name="Fav" x:Name="Fav"
Text="Favoris" Text="Favoris"
SemanticProperties.Hint="Counts the number of times you click" SemanticProperties.Hint="Counts the number of times you click"

@ -1,13 +1,9 @@
namespace CanYouBuildIt.Views; namespace CanYouBuildIt.Views;
using CanYouBuildIt.Model; public partial class Favoris : ContentPage
using System.Diagnostics; {
public Favoris()
namespace CanYouBuildIt.Views; {
public partial class Favoris : ContentPage InitializeComponent();
{ }
public Favoris()
{
InitializeComponent();
}
} }
Loading…
Cancel
Save