|
|
|
@ -18,7 +18,7 @@ namespace TheGameExtreme.view
|
|
|
|
|
OnPropertyChanged("InstructionText");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public List<int> listNbPlayer = new List<int>();
|
|
|
|
|
public List<string> listNbPlayer = new List<string> { "1", "2", "3", "4", "5" };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public GamePreparationPage()
|
|
|
|
@ -27,11 +27,7 @@ namespace TheGameExtreme.view
|
|
|
|
|
NavigationPage.SetHasNavigationBar(this, false);
|
|
|
|
|
Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this));
|
|
|
|
|
InstructionText = AppRessource.StrPlayerSelection;
|
|
|
|
|
listNbPlayer.Add(1);
|
|
|
|
|
listNbPlayer.Add(2);
|
|
|
|
|
listNbPlayer.Add(3);
|
|
|
|
|
listNbPlayer.Add(4);
|
|
|
|
|
listNbPlayer.Add(5);
|
|
|
|
|
PlayerSelecter.ItemsSource = listNbPlayer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async void Back(object sender, EventArgs e)
|
|
|
|
@ -43,5 +39,21 @@ namespace TheGameExtreme.view
|
|
|
|
|
{
|
|
|
|
|
await Navigation.PushAsync(new MainPage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ChangedPseudo(object sender, EventArgs args)
|
|
|
|
|
{
|
|
|
|
|
while (NameList.Children.Count != (int)PlayerSelecter.SelectedItem)
|
|
|
|
|
if (NameList.Children.Count < (int)PlayerSelecter.SelectedItem)
|
|
|
|
|
{
|
|
|
|
|
Editor e = new Editor();
|
|
|
|
|
e.Placeholder = "Enter your pseudo";
|
|
|
|
|
|
|
|
|
|
NameList.Children.Add(e);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|