Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. //form1
  2. private void btnInfos_Click(object sender, EventArgs e)
  3. {
  4. FrmInfos frmInfos = new FrmInfos();
  5. string equipe = lstEqJo.SelectedItem.ToString();
  6. int i = 0;
  7. int j = 0;
  8. int k = 0;
  9. bool trouve = false;
  10. while (i < equipes.LesEquipes.GetLongLength(0) && !trouve) {
  11. while (j < equipes.LesEquipes.GetLongLength(1) && !trouve) {
  12. while (k < equipes.LesEquipes.GetLongLength(2) && !trouve) {
  13. if (equipes.LesEquipes[i, j, k].Nom.Contains(equipe))
  14. trouve = true;
  15. k++;
  16. }
  17. j++;
  18. }
  19. i++;
  20. }
  21. frmInfos.EquipeChoisie = equipes.LesEquipes[i - 1, j - 1, k - 1];
  22. frmInfos.ShowDialog();
  23. }
  24.  
  25. //form2
  26. private void MontrerJoueurs()
  27. {
  28. try {
  29. int i = 0;
  30. while (true) {
  31. lstJoueurs.Items.Add(EquipeChoisie.GetJoueur(i).Nom.ToString());//is null on first iteration
  32. i++;
  33. }
  34.  
  35. } catch (Exception) {}
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement