Ejemplo n.º 1
0
 // Checks if both teams have 11 players, if less than this it shows the confirmation buttons.
 // This makes sure that the user has input the correct number of players.
 private void Begin_Match_Button_Click(object sender, EventArgs e)
 {
     if (currentTableRowAway < 11 || currentTableRowHome < 11)
     {
         if (currentTableRowAway < 8 || currentTableRowHome < 8)
         {
             Begin_Match_Confirm_Label.Text = "Each team must have a minimum of 8 players";
             Begin_Match_Confirm_Table.Show();
             Begin_Match_Cancel_Button.Hide();
             Begin_Match_Confirm_Button.Hide();
         }
         else
         {
             Begin_Match_Button.Hide();
             Begin_Match_Confirm_Label.Text = AwayTeamNameText + " has " + currentTableRowAway + " players, " + HomeTeamNameText + " has " + currentTableRowHome + " players";
             Begin_Match_Confirm_Table.Show();
             Begin_Match_Cancel_Button.Show();
             Begin_Match_Confirm_Button.Show();
         }
     }
     else
     {
         BeginMatch();
     }
 }
Ejemplo n.º 2
0
 // Hides the confirmation table and allows the user to make changes to the team lists.
 private void Begin_Match_Cancel_Button_Click(object sender, EventArgs e)
 {
     Begin_Match_Confirm_Table.Hide();
     Begin_Match_Button.Show();
 }