Modification de la navigation entre page

master
cldupland 6 years ago
parent 2c742347a7
commit 26e928e7b9

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.uca.thegameextreme" android:installLocation="auto">
android:versionCode="1" android:versionName="1.0"
package="com.uca.thegameextreme"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" /> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="TheGameExtreme.Android" <application android:label="TheGameExtreme.Android" android:icon="@drawable/Apple"></application>
android:icon="@drawable/Apple"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest> </manifest>

@ -1,11 +1,11 @@
#pragma warning disable 1591 #pragma warning disable 1591
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Ce code a été généré par un outil. // This code was generated by a tool.
// Version du runtime :4.0.30319.42000 // Runtime Version:4.0.30319.42000
// //
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si // Changes to this file may cause incorrect behavior and will be lost if
// le code est régénéré. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

@ -154,7 +154,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Apple.ico" /> <Content Include="Apple.ico" />
<BundleResource Include="Resources\Arrow-left.png" />
<BundleResource Include="Resources\ArrowSettingsBack.png" /> <BundleResource Include="Resources\ArrowSettingsBack.png" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -7,10 +7,11 @@
x:Class="TheGameExtreme.view.GamePreparationPage"> x:Class="TheGameExtreme.view.GamePreparationPage">
<Grid <Grid
Margin="0,30,0,0"> Margin="5,5,5,5">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="35*" /> <RowDefinition Height="10*" />
<RowDefinition Height="55*"/> <RowDefinition Height="25*" />
<RowDefinition Height="55*" />
<RowDefinition Height="10*" /> <RowDefinition Height="10*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -20,27 +21,43 @@
<StackLayout <StackLayout
Grid.Row="0" Grid.Row="0"
Grid.Column="0">
<ImageButton Source="ArrowSettingsBack.png"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="40"
WidthRequest="50"
Clicked="Back"
BackgroundColor="Transparent"
Margin="10,0,0,0"/>
</StackLayout>
<StackLayout
Grid.Row="1"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="1"> Grid.ColumnSpan="1">
<Label x:Name="Instruction"/> <Label x:Name="Instruction"/>
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="1" Grid.Row="2"
Grid.Column="0"> Grid.Column="0">
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="1" Grid.Row="2"
Grid.Column="1"> Grid.Column="1">
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="2" Grid.Row="3"
Grid.Column="0"> Grid.Column="0"
Grid.ColumnSpan="1">
<Button
Text="Play"
Clicked="Play"/>
</StackLayout> </StackLayout>
</Grid> </Grid>

@ -27,5 +27,15 @@ namespace TheGameExtreme.view
Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this)); Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this));
InstructionText = AppRessource.StrPlayerSelection; InstructionText = AppRessource.StrPlayerSelection;
} }
private async void Back(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
private async void Play(object sender, EventArgs args)
{
await Navigation.PushAsync(new MainPage());
}
} }
} }

@ -8,85 +8,101 @@
mc:Ignorable="d" mc:Ignorable="d"
x:Class="TheGameExtreme.view.MainPage"> x:Class="TheGameExtreme.view.MainPage">
<ScrollView <StackLayout
Orientation="Vertical"> Margin="5,5,5,5">
<StackLayout> <StackLayout>
<ImageButton Source="ArrowSettingsBack.png"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="40"
WidthRequest="50"
Clicked="Back"
BackgroundColor="Transparent"
Margin="10,0,0,0"/>
</StackLayout>
<ScrollView
Orientation="Vertical">
<StackLayout> <StackLayout>
<StackLayout
Orientation="Vertical" <StackLayout>
Margin="10,20,10,20">
<Label x:Name="pseudo" Text="Pseudo" />
<Label Text="Selectionner la pile sur laquel vous souhaitez poser la carte:" />
<StackLayout <StackLayout
Orientation="Horizontal" Orientation="Vertical"
Margin="0,0,0,40"> Margin="10,20,10,20">
<Label x:Name="pseudo" Text="Pseudo" />
<Label Text="Selectionner la pile sur laquel vous souhaitez poser la carte:" />
<StackLayout <StackLayout
Orientation="Vertical"> Orientation="Horizontal"
<Label HorizontalTextAlignment="Center" x:Name="pile0" Text="1" /> Margin="0,0,0,40">
<StackLayout <StackLayout
Orientation="Horizontal"> Orientation="Vertical">
<CheckBox x:Name="checkbox0" CheckedChanged="radioButton" /> <Label HorizontalTextAlignment="Center" x:Name="pile0" Text="1" />
<Label VerticalTextAlignment="Center" Text="Pile Ascendante" /> <StackLayout
Orientation="Horizontal">
<CheckBox x:Name="checkbox0" CheckedChanged="radioButton" />
<Label VerticalTextAlignment="Center" Text="Pile Ascendante" />
</StackLayout>
</StackLayout> </StackLayout>
</StackLayout>
<StackLayout
Orientation="Vertical">
<Label HorizontalTextAlignment="Center" x:Name="pile1" Text="1" />
<StackLayout <StackLayout
Orientation="Horizontal"> Orientation="Vertical">
<CheckBox x:Name="checkbox1" CheckedChanged="radioButton" /> <Label HorizontalTextAlignment="Center" x:Name="pile1" Text="1" />
<Label VerticalTextAlignment="Center" Text="Pile Ascendante" /> <StackLayout
Orientation="Horizontal">
<CheckBox x:Name="checkbox1" CheckedChanged="radioButton" />
<Label VerticalTextAlignment="Center" Text="Pile Ascendante" />
</StackLayout>
</StackLayout> </StackLayout>
</StackLayout>
<StackLayout
Orientation="Vertical">
<Label HorizontalTextAlignment="Center" x:Name="pile2" Text="100" />
<StackLayout <StackLayout
Orientation="Horizontal"> Orientation="Vertical">
<CheckBox x:Name="checkbox2" CheckedChanged="radioButton" /> <Label HorizontalTextAlignment="Center" x:Name="pile2" Text="100" />
<Label VerticalTextAlignment="Center" Text="Pile Descendante" /> <StackLayout
Orientation="Horizontal">
<CheckBox x:Name="checkbox2" CheckedChanged="radioButton" />
<Label VerticalTextAlignment="Center" Text="Pile Descendante" />
</StackLayout>
</StackLayout> </StackLayout>
</StackLayout>
<StackLayout
Orientation="Vertical">
<Label HorizontalTextAlignment="Center" x:Name="pile3" Text="100" />
<StackLayout <StackLayout
Orientation="Horizontal"> Orientation="Vertical">
<CheckBox x:Name="checkbox3" CheckedChanged="radioButton" /> <Label HorizontalTextAlignment="Center" x:Name="pile3" Text="100" />
<Label VerticalTextAlignment="Center" Text="Pile Descendante" /> <StackLayout
Orientation="Horizontal">
<CheckBox x:Name="checkbox3" CheckedChanged="radioButton" />
<Label VerticalTextAlignment="Center" Text="Pile Descendante" />
</StackLayout>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</StackLayout> <Label Text="Veuillez selectionner une carte à placer:" />
<Label Text="Veuillez selectionner une carte à placer:" /> <ScrollView
<ScrollView
Orientation="Horizontal"
Padding="0,5,0,5">
<StackLayout
Orientation="Horizontal" Orientation="Horizontal"
x:Name="Hand"> Padding="0,5,0,5">
<Button x:Name="card1" Clicked="played" /> <StackLayout
<Button x:Name="card2" Clicked="played" /> Orientation="Horizontal"
<Button x:Name="card3" Clicked="played" /> x:Name="Hand">
<Button x:Name="card4" Clicked="played" /> <Button x:Name="card1" Clicked="played" />
<Button x:Name="card5" Clicked="played" /> <Button x:Name="card2" Clicked="played" />
<Button x:Name="card6" Clicked="played" /> <Button x:Name="card3" Clicked="played" />
<Button x:Name="card7" Clicked="played" /> <Button x:Name="card4" Clicked="played" />
</StackLayout> <Button x:Name="card5" Clicked="played" />
</ScrollView> <Button x:Name="card6" Clicked="played" />
</StackLayout> <Button x:Name="card7" Clicked="played" />
<StackLayout </StackLayout>
x:Name="botPanel" </ScrollView>
Orientation="Vertical" </StackLayout>
Margin="20"> <StackLayout
<Button Text="End Turn" Clicked="endTurn" /> x:Name="botPanel"
<Label x:Name="Alert" /> Orientation="Vertical"
Margin="20">
<Button Text="End Turn" Clicked="endTurn" />
<Label x:Name="Alert" />
</StackLayout>
</StackLayout> </StackLayout>
</StackLayout>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
</StackLayout>
</ContentPage> </ContentPage>

@ -21,6 +21,7 @@ namespace TheGameExtreme.view
public MainPage() public MainPage()
{ {
InitializeComponent(); InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
stacks.Add(checkbox0); stacks.Add(checkbox0);
stacks.Add(checkbox1); stacks.Add(checkbox1);
@ -162,5 +163,10 @@ namespace TheGameExtreme.view
inflateHand(); inflateHand();
} }
} }
private async void Back(object sender, EventArgs args)
{
await Navigation.PopToRootAsync();
}
} }
} }

@ -15,7 +15,7 @@ namespace TheGameExtreme.view
private async void BackMulti_Clicked(object sender, EventArgs e) private async void BackMulti_Clicked(object sender, EventArgs e)
{ {
await Navigation.PushAsync(new HomePage()); await Navigation.PopAsync();
} }
} }
} }

@ -62,8 +62,8 @@ namespace TheGameExtreme.view
} }
private async void SettingToHomePage(object sender, EventArgs e) private async void SettingToHomePage(object sender, EventArgs e)
{ {
await Navigation.PushAsync(new HomePage()); await Navigation.PopAsync();
} }
} }
} }

@ -9,7 +9,17 @@ namespace TheGameExtreme.viewmodel
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
public Card View { get; set; } public Card View { get; set; }
private int value; protected string image;
public string Image
{
get { return image; }
set
{
image = value;
OnPropertyChanged("Image");
}
}
protected int value;
public int Value { public int Value {
get { return value; } get { return value; }
set set

Loading…
Cancel
Save