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,9 +7,10 @@
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="25*" />
<RowDefinition Height="55*" /> <RowDefinition Height="55*" />
<RowDefinition Height="10*" /> <RowDefinition Height="10*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -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,6 +8,20 @@
mc:Ignorable="d" mc:Ignorable="d"
x:Class="TheGameExtreme.view.MainPage"> x:Class="TheGameExtreme.view.MainPage">
<StackLayout
Margin="5,5,5,5">
<StackLayout>
<ImageButton Source="ArrowSettingsBack.png"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="40"
WidthRequest="50"
Clicked="Back"
BackgroundColor="Transparent"
Margin="10,0,0,0"/>
</StackLayout>
<ScrollView <ScrollView
Orientation="Vertical"> Orientation="Vertical">
@ -89,4 +103,6 @@
</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();
} }
} }
} }

@ -63,7 +63,7 @@ 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