|
|
|
@ -10,6 +10,7 @@ namespace TheGameExtreme.view
|
|
|
|
|
public List<int> listNbPlayer = new List<int> { 1, 2, 3, 4, 5 };
|
|
|
|
|
public List<string> listGameMode = new List<string> { "entières", "relatives", "décimales", "dizaines", "centaines", "millièmes", "fractionnées" };
|
|
|
|
|
public List<int> listNbStack = new List<int> { 4, 6, 8 };
|
|
|
|
|
public List<int> listNbCard = new List<int> { 100, 80, 60, 40 };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public GamePreparationPage()
|
|
|
|
@ -26,6 +27,9 @@ namespace TheGameExtreme.view
|
|
|
|
|
SelectNbStack.ItemsSource = listNbStack;
|
|
|
|
|
LoadParameterNbStacksGamePreparation();
|
|
|
|
|
|
|
|
|
|
SelectNbCard.ItemsSource = listNbCard;
|
|
|
|
|
LoadParameterNbCardsGamePreparation();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -35,6 +39,7 @@ namespace TheGameExtreme.view
|
|
|
|
|
IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationGameModeValue(SelectMode.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationNbStacks(SelectNbStack.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex);
|
|
|
|
|
await Navigation.PopAsync();
|
|
|
|
|
}
|
|
|
|
|
protected override bool OnBackButtonPressed()
|
|
|
|
@ -42,6 +47,7 @@ namespace TheGameExtreme.view
|
|
|
|
|
IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationGameModeValue(SelectMode.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationNbStacks(SelectNbStack.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex);
|
|
|
|
|
return base.OnBackButtonPressed();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -62,6 +68,7 @@ namespace TheGameExtreme.view
|
|
|
|
|
IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationGameModeValue(SelectMode.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationNbStacks(SelectNbStack.SelectedIndex);
|
|
|
|
|
IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex);
|
|
|
|
|
await Navigation.PushAsync(new MainPage(playersNames, (int)SelectNbStack.SelectedItem, (int)SelectMode.SelectedIndex));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -108,6 +115,11 @@ namespace TheGameExtreme.view
|
|
|
|
|
int nbStackSer = IOGamePreparation.LoadParamaterGamePreparationNbStacks();
|
|
|
|
|
SelectNbStack.SelectedIndex = nbStackSer;
|
|
|
|
|
}
|
|
|
|
|
public void LoadParameterNbCardsGamePreparation()
|
|
|
|
|
{
|
|
|
|
|
int nbCards = IOGamePreparation.LoadParameterGamePreparationNbCards();
|
|
|
|
|
SelectNbCard.SelectedIndex = nbCards;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|