Merge pull request 'connexionView' (#9) from connexionView into master

Reviewed-on: nicolas.barbosa/mastermind#9
master
Céleste BARBOSA 1 year ago
commit 469f496f8a

@ -1,11 +1,12 @@
# mastermind
SAE2.01 - Développement d'une application
R2.02 - Développement d'applications avec IHM
R2.03 - Qualité de développement
Mastermind en C#, MAUI, et .net
BARBOSA Céleste
PRADY Pauline
TURPIN--ETIENNE Camille
SAE2.01 - Développement d'une application
R2.02 - Développement d'applications avec IHM
R2.03 - Qualité de développement
Mastermind en C#, MAUI, et .net
BARBOSA Céleste
PRADY Pauline
TURPIN--ETIENNE Camille

@ -4,12 +4,11 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:mastermind"
Shell.FlyoutBehavior="Disabled"
Title="mastermind">
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
xmlns:pages="clr-namespace:mastermind.Pages"
Shell.FlyoutBehavior="Flyout"
Title="Mastermind">
<ShellContent
Title="Connexion"
ContentTemplate="{DataTemplate pages:ConnexionPage}" />
</Shell>

@ -0,0 +1,7 @@
<?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="mastermind.Connexion">
</ContentPage>

@ -0,0 +1,10 @@
namespace mastermind
{
public partial class Connexion : ContentPage
{
public Connexion()
{
InitializeComponent();
}
}
}

@ -1,36 +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="mastermind.MainPage">
<ScrollView>
<VerticalStackLayout
Padding="30,0"
Spacing="25">
<Image
Source="dotnet_bot.png"
HeightRequest="185"
Aspect="AspectFit"
SemanticProperties.Description="dot net bot in a race car number eight" />
<Label
Text="Hello, World!"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
<Label
Text="Welcome to &#10;.NET Multi-platform App UI"
Style="{StaticResource SubHeadline}"
SemanticProperties.HeadingLevel="Level2"
SemanticProperties.Description="Welcome to dot net Multi platform App U I" />
<Button
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -1,25 +0,0 @@
namespace mastermind
{
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);
}
}
}

@ -0,0 +1,21 @@
<?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:Views="clr-namespace:mastermind.Views"
x:Class="mastermind.Pages.ConnexionPage"
Title="Connexion">
<VerticalStackLayout>
<Label
Text="JOUEURS"
HorizontalOptions="Center"
FontSize="Header"
Margin="0, 0, 0, 50"/>
<Views:UsernameEntryView/>
<Views:UsernameEntryView/>
<Button
Text="Se connecter"
Margin="200, 100, 200, 0"/>
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace mastermind.Pages;
public partial class ConnexionPage : ContentPage
{
public ConnexionPage()
{
InitializeComponent();
}
}

@ -0,0 +1,24 @@
<?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="mastermind.Views.UsernameEntryView">
<Grid
Margin="0, 50"
ColumnDefinitions="auto, *, 8*, *"
RowDefinitions="auto">
<Label
Text="Joueur X"
FontSize="Large"
Margin="50, 0, 0, 0"
VerticalOptions="Center"
HorizontalOptions="Center"/>
<Entry
Grid.Column="2"
FontSize="Medium"
Margin="50, 0"/>
</Grid>
</ContentView>

@ -0,0 +1,9 @@
namespace mastermind.Views;
public partial class UsernameEntryView : ContentView
{
public UsernameEntryView()
{
InitializeComponent();
}
}

@ -62,4 +62,22 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Connexion.xaml.cs">
<DependentUpon>Connexion.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\connexionPage.xaml.cs">
<DependentUpon>ConnexionPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Pages\ConnexionPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\UsernameEntry.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

Loading…
Cancel
Save