Example #1
0
 private void DialogWizardUndropPlayer_Load(object sender, EventArgs e)
 {
     if (this.CurrentTournament == null)
     {
         int num = (int)MessageBox.Show("Invalid tournament");
         this.DialogResult = DialogResult.Cancel;
         this.Close();
     }
     else
     {
         TournPlayerArray tournPlayerArray = new TournPlayerArray();
         int num1 = this.CurrentTournament.CurrentRound - 1;
         foreach (ITournPlayer player in (IEnumerable <ITournPlayer>) this.CurrentTournament.Players)
         {
             if (player.DropRound == num1)
             {
                 tournPlayerArray.AddPlayer(player);
             }
         }
         if (tournPlayerArray.Count == 0)
         {
             int num2 = (int)MessageBox.Show("No Dropped Players");
             this.DialogResult = DialogResult.Cancel;
             this.Close();
         }
         else
         {
             tournPlayerArray.SortByLastname();
             this.ddlDroppedPlayers.DataSource    = (object)tournPlayerArray;
             this.ddlDroppedPlayers.SelectedIndex = 0;
         }
     }
 }
Example #2
0
        public SwissTournament()
        {
            Players = new TournPlayerArray();

            CurrentRound = 0;
        }