private void btnModuleCompetitionsEnCours_Click(object sender, RoutedEventArgs e) { if (this.club != null) { if (this.club.Liste_compet.Count == 0) { MessageBox.Show("Aucune competition en cours"); } else { ModuleEnCoursCompetition retrouverCompet = new ModuleEnCoursCompetition(this.club.Liste_compet.Count); retrouverCompet.Owner = this; retrouverCompet.ShowDialog(); if (retrouverCompet.DialogResult == true) { if (this.club.Liste_compet[retrouverCompet.NbReturn - 1].Compet_finie == false) { ModuleCreationCompetition creationResteDeLaCompet = new ModuleCreationCompetition(this.club.Liste_compet[retrouverCompet.NbReturn - 1], this.club.Liste_Membre); this.Hide(); creationResteDeLaCompet.Owner = this; creationResteDeLaCompet.ShowDialog(); this.ShowDialog(); } else { MessageBox.Show("La competition selectionnée a ete fini"); } } } } else { MessageBox.Show("Charger un club avant toutes actions"); } }
private void btnModuleCompetitions_Click(object sender, RoutedEventArgs e) { Competition compet = null; if (this.club != null) { FenAjoutCompetition ajoutCompet = new FenAjoutCompetition(this.club); this.Hide(); ajoutCompet.Owner = this; ajoutCompet.ShowDialog(); if (ajoutCompet.IsActive == false && ajoutCompet.DialogResult == true) { compet = ajoutCompet.ACreer; ModuleCreationCompetition creationResteDeLaCompet = new ModuleCreationCompetition(compet, this.club.Liste_Membre); this.Hide(); creationResteDeLaCompet.Owner = this; creationResteDeLaCompet.ShowDialog(); this.club.Liste_compet.Add(creationResteDeLaCompet.CompetCree); } this.ShowDialog(); } else { MessageBox.Show("Charger un club avant toutes actions"); } }