Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //form1
- private void btnInfos_Click(object sender, EventArgs e)
- {
- FrmInfos frmInfos = new FrmInfos();
- string equipe = lstEqJo.SelectedItem.ToString();
- int i = 0;
- int j = 0;
- int k = 0;
- bool trouve = false;
- while (i < equipes.LesEquipes.GetLongLength(0) && !trouve) {
- while (j < equipes.LesEquipes.GetLongLength(1) && !trouve) {
- while (k < equipes.LesEquipes.GetLongLength(2) && !trouve) {
- if (equipes.LesEquipes[i, j, k].Nom.Contains(equipe))
- trouve = true;
- k++;
- }
- j++;
- }
- i++;
- }
- frmInfos.EquipeChoisie = equipes.LesEquipes[i - 1, j - 1, k - 1];
- frmInfos.ShowDialog();
- }
- //form2
- private void MontrerJoueurs()
- {
- try {
- int i = 0;
- while (true) {
- lstJoueurs.Items.Add(EquipeChoisie.GetJoueur(i).Nom.ToString());//is null on first iteration
- i++;
- }
- } catch (Exception) {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement