Cehckbox langue gérer + view gamePreparation

master
Baptiste ARNAUD 6 years ago
parent 31749dd382
commit f676fd940e

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

@ -132,6 +132,15 @@ namespace TheGameExtreme {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Veuillez saisir votre pseudo.
/// </summary>
internal static string StrEnterPseudo {
get {
return ResourceManager.GetString("StrEnterPseudo", resourceCulture);
}
}
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Le jeu est terminé! Désolé, vous avez perdu... Essayez encore!. /// Recherche une chaîne localisée semblable à Le jeu est terminé! Désolé, vous avez perdu... Essayez encore!.
/// </summary> /// </summary>

@ -186,4 +186,7 @@
<data name="StrPlayerSelection" xml:space="preserve"> <data name="StrPlayerSelection" xml:space="preserve">
<value>Veuillez choisir un nombre de joueur et leur(s) nom(s)</value> <value>Veuillez choisir un nombre de joueur et leur(s) nom(s)</value>
</data> </data>
<data name="StrEnterPseudo" xml:space="preserve">
<value>Veuillez saisir votre pseudo</value>
</data>
</root> </root>

@ -1,44 +1,57 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // Ce code a été généré par un outil.
// Runtime Version:4.0.30319.42000 // Version du runtime :4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// the code is regenerated. // le code est régénéré.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace TheGameExtreme { namespace TheGameExtreme {
using System; using System;
using System.Reflection;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] /// <summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()] /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] /// </summary>
// Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
// à l'aide d'un outil, tel que ResGen ou Visual Studio.
// Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
// avec l'option /str ou régénérez votre projet VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class AppRessources_br { internal class AppRessources_br {
private static System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal AppRessources_br() { internal AppRessources_br() {
} }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] /// <summary>
internal static System.Resources.ResourceManager ResourceManager { /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.Equals(null, resourceMan)) { if (object.ReferenceEquals(resourceMan, null)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("TheGameExtreme.AppRessources-br", typeof(AppRessources_br).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheGameExtreme.AppRessources-br", typeof(AppRessources_br).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] /// <summary>
internal static System.Globalization.CultureInfo Culture { /// Remplace la propriété CurrentUICulture du thread actuel pour toutes
/// les recherches de ressources à l'aide de cette classe de ressource fortement typée.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
@ -47,84 +60,147 @@ namespace TheGameExtreme {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à rising stack.
/// </summary>
internal static string StrAcendingStack { internal static string StrAcendingStack {
get { get {
return ResourceManager.GetString("StrAcendingStack", resourceCulture); return ResourceManager.GetString("StrAcendingStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à the chosen pile does not exist.
/// </summary>
internal static string StrCantGetStack { internal static string StrCantGetStack {
get { get {
return ResourceManager.GetString("StrCantGetStack", resourceCulture); return ResourceManager.GetString("StrCantGetStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à You have not played enough cards!.
/// </summary>
internal static string StrCardPlayedLessThanTwo { internal static string StrCardPlayedLessThanTwo {
get { get {
return ResourceManager.GetString("StrCardPlayedLessThanTwo", resourceCulture); return ResourceManager.GetString("StrCardPlayedLessThanTwo", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Please select a card to place on a stack.
/// </summary>
internal static string StrChooseCardToPlay { internal static string StrChooseCardToPlay {
get { get {
return ResourceManager.GetString("StrChooseCardToPlay", resourceCulture); return ResourceManager.GetString("StrChooseCardToPlay", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Select the stack on which you want to put the card.
/// </summary>
internal static string StrChooseStack { internal static string StrChooseStack {
get { get {
return ResourceManager.GetString("StrChooseStack", resourceCulture); return ResourceManager.GetString("StrChooseStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Down stack.
/// </summary>
internal static string StrDownStack { internal static string StrDownStack {
get { get {
return ResourceManager.GetString("StrDownStack", resourceCulture); return ResourceManager.GetString("StrDownStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à End of turn.
/// </summary>
internal static string StrEndTurn { internal static string StrEndTurn {
get { get {
return ResourceManager.GetString("StrEndTurn", resourceCulture); return ResourceManager.GetString("StrEndTurn", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à .
/// </summary>
internal static string String1 { internal static string String1 {
get { get {
return ResourceManager.GetString("String1", resourceCulture); return ResourceManager.GetString("String1", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à The game is over! Sorry, you lost ... Try again!.
/// </summary>
internal static string StrLose { internal static string StrLose {
get { get {
return ResourceManager.GetString("StrLose", resourceCulture); return ResourceManager.GetString("StrLose", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à The game is over! Sorry, you lost ... You had to play three cards because of the effect \ &quot;Three cards played \&quot; off your game does not play as much! Try again!.
/// </summary>
internal static string StrLose3CardEffect { internal static string StrLose3CardEffect {
get { get {
return ResourceManager.GetString("StrLose3CardEffect", resourceCulture); return ResourceManager.GetString("StrLose3CardEffect", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à The player has no more cards in his hand.
/// </summary>
internal static string StrNoMoreCardOnHand { internal static string StrNoMoreCardOnHand {
get { get {
return ResourceManager.GetString("StrNoMoreCardOnHand", resourceCulture); return ResourceManager.GetString("StrNoMoreCardOnHand", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à -The goal is to beat the game! Alone or with others!
///
///-98 cards numbered from 2 to 99.
///
///-4 batteries are at your disposal, two ascending and two descending.
///
///-The objective is to be able to put all the cards of the picks on the different piles at your disposal.
///
///-If you get to empty all the deck and put all the cards on the piles, you win, otherwise you lose.
///
///-Every player must play at least two cards per turn.
///
///-On an ascending stack, it is possible to roll back 10 (eg 73 is played -&gt; possibil [le reste de la chaîne a été tronqué]&quot;;.
/// </summary>
internal static string StrRules {
get {
return ResourceManager.GetString("StrRules", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Sorry, you did not cover the skull ... Try again;).
/// </summary>
internal static string StrSkullEffect { internal static string StrSkullEffect {
get { get {
return ResourceManager.GetString("StrSkullEffect", resourceCulture); return ResourceManager.GetString("StrSkullEffect", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à The game is over! Well done you won!.
/// </summary>
internal static string StrWin { internal static string StrWin {
get { get {
return ResourceManager.GetString("StrWin", resourceCulture); return ResourceManager.GetString("StrWin", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à The card does not fit in the selected stack!.
/// </summary>
internal static string StrWrongStack { internal static string StrWrongStack {
get { get {
return ResourceManager.GetString("StrWrongStack", resourceCulture); return ResourceManager.GetString("StrWrongStack", resourceCulture);

@ -155,6 +155,25 @@
<data name="StrNoMoreCardOnHand" xml:space="preserve"> <data name="StrNoMoreCardOnHand" xml:space="preserve">
<value>The player has no more cards in his hand</value> <value>The player has no more cards in his hand</value>
</data> </data>
<data name="StrRules" xml:space="preserve">
<value>-The goal is to beat the game! Alone or with others!
-98 cards numbered from 2 to 99.
-4 batteries are at your disposal, two ascending and two descending.
-The objective is to be able to put all the cards of the picks on the different piles at your disposal.
-If you get to empty all the deck and put all the cards on the piles, you win, otherwise you lose.
-Every player must play at least two cards per turn.
-On an ascending stack, it is possible to roll back 10 (eg 73 is played -&gt; possibility to play above 73 or 63).
-On a falling stack, it is possible to roll back 10 (eg 73 is played -&gt; possibility to play below 73 or 83).
-The cohesion and strategy will be two important friends to overcome The Game.</value>
</data>
<data name="StrSkullEffect" xml:space="preserve"> <data name="StrSkullEffect" xml:space="preserve">
<value>Sorry, you did not cover the skull ... Try again;)</value> <value>Sorry, you did not cover the skull ... Try again;)</value>
</data> </data>

@ -64,6 +64,8 @@
</Compile> </Compile>
<Compile Update="AppRessources-br.Designer.cs"> <Compile Update="AppRessources-br.Designer.cs">
<DependentUpon>AppRessources-br.resx</DependentUpon> <DependentUpon>AppRessources-br.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -40,6 +40,7 @@
HorizontalTextAlignment="Center" HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
x:Name="Instruction" x:Name="Instruction"
FontSize="24"
TextColor="{DynamicResource WhiteColor}"/> TextColor="{DynamicResource WhiteColor}"/>
</StackLayout> </StackLayout>
@ -47,11 +48,22 @@
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="0"
Margin="50,0,50,0"> Margin="50,0,50,0">
<Picker <Frame BackgroundColor="{DynamicResource SkyBlueColor}"
x:Name="PlayerSelecter" CornerRadius="10"
BackgroundColor="{DynamicResource SkyBlueColor}" HeightRequest="45"
SelectedIndexChanged="ChangedPseudo" VerticalOptions="Center"
Margin="50,0,50,0"/> HorizontalOptions="Center"
WidthRequest="150">
<Picker
x:Name="PlayerSelecter"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="ChangedPseudo"
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="220"
Margin="50,0,50,0"/>
</Frame>
</StackLayout> </StackLayout>
<ScrollView <ScrollView
@ -61,9 +73,18 @@
<StackLayout <StackLayout
x:Name="NameList"> x:Name="NameList">
<Entry <Frame BackgroundColor="{DynamicResource SkyBlueColor}"
CornerRadius="10"
HeightRequest="45"
VerticalOptions="Center"
HorizontalOptions="Center"
WidthRequest="120">
<Entry
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
Placeholder="Enter your pseudo"/> Placeholder="Pseudo"
HorizontalTextAlignment="Start"/>
</Frame>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
@ -74,7 +95,11 @@
Grid.ColumnSpan="2"> Grid.ColumnSpan="2">
<Button <Button
Text="Play" Text="Play"
Clicked="Play"/> Clicked="Play"
HorizontalOptions="Center"
WidthRequest="220"
BackgroundColor="{DynamicResource SkyBlueColor}"
CornerRadius="10"/>
</StackLayout> </StackLayout>
</Grid> </Grid>

@ -45,7 +45,7 @@ namespace TheGameExtreme.view
playersNames.Add(((Entry)NameList.Children[i]).Text); playersNames.Add(((Entry)NameList.Children[i]).Text);
if (string.IsNullOrWhiteSpace(playersNames[playersNames.Count - 1])) if (string.IsNullOrWhiteSpace(playersNames[playersNames.Count - 1]))
{ {
await DisplayAlert("Erreur Pseudo", "Veuillez remplir tous les pseudos", "OK"); await DisplayAlert("Erreur pseudo", AppRessource.StrEnterPseudo, "OK");
return; return;
} }
} }
@ -59,12 +59,24 @@ namespace TheGameExtreme.view
{ {
if (NameList.Children.Count < (int)PlayerSelecter.SelectedItem) if (NameList.Children.Count < (int)PlayerSelecter.SelectedItem)
{ {
Entry e = new Entry Entry e = new Entry
{ {
Placeholder = "Enter your pseudo", Placeholder = "Pseudo",
BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"] BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"]
}; };
NameList.Children.Add(e); Frame myFrame = new Frame
{
BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"],
HeightRequest = 45,
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.Center,
WidthRequest = 120,
CornerRadius = 10,
Content = e
};
NameList.Children.Add(myFrame);
} }
else else
{ {

@ -74,7 +74,7 @@
<CheckBox <CheckBox
IsChecked="True" IsChecked="True"
x:Name="CBFr" x:Name="CBFr"
CheckedChanged="CBFr_CheckedChanged"/> CheckedChanged ="CBFr_CheckedChanged"/>
</StackLayout> </StackLayout>
</Grid> </Grid>
@ -85,13 +85,14 @@
<Label <Label
HorizontalTextAlignment="Start" HorizontalTextAlignment="Start"
Text="Mode Extreme" Text="Mode Extreme : "
FontSize="25" FontSize="25"
TextColor="{DynamicResource WhiteColor}"/> TextColor="{DynamicResource WhiteColor}"/>
<Switch <Switch
OnColor="{DynamicResource SkyBlueColor}" OnColor="{DynamicResource SkyBlueColor}"
ThumbColor="WhiteSmoke"/> ThumbColor="WhiteSmoke"
Margin="30,0,0,50"/>
</StackLayout> </StackLayout>
@ -100,12 +101,13 @@
Orientation="Horizontal"> Orientation="Horizontal">
<Label <Label
Text="Thème Clair" Text="Thème Clair : "
FontSize="25" FontSize="25"
TextColor="{DynamicResource WhiteColor}"/> TextColor="{DynamicResource WhiteColor}"/>
<Switch <Switch
Toggled="Switch_Toggled_Theme" Toggled="Switch_Toggled_Theme"
Margin="30,0,0,50"
x:Name="swTheme" x:Name="swTheme"
OnColor="{DynamicResource SkyBlueColor}" OnColor="{DynamicResource SkyBlueColor}"
ThumbColor="WhiteSmoke"/> ThumbColor="WhiteSmoke"/>

@ -23,23 +23,39 @@ namespace TheGameExtreme.view
} }
} }
private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e) private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e)
{ {
if(CBBr.IsChecked == true) if (CBBr.IsChecked == true)
{
CBFr.IsChecked = false;
}
else if(CBBr.IsChecked == false)
{ {
CBFr.IsChecked = !CBBr.IsChecked; CBFr.IsChecked = true;
} }
} }
private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e) private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e)
{ {
if(CBFr.IsChecked == true) if (CBFr.IsChecked == true)
{
CBBr.IsChecked = false;
}
else if (CBFr.IsChecked == false)
{ {
CBBr.IsChecked = !CBBr.IsChecked; CBBr.IsChecked = true;
} }
} }

Loading…
Cancel
Save