Exemplo n.º 1
0
 private void bMySQLTournament_Click(object sender, EventArgs e)
 {
     startLoading();
     try
     {
         ChooseTournament choose = new ChooseTournament();
         choose.ShowDialog();
         if (choose.chosenTournament != null)
         {
             tournament = choose.chosenTournament;
             updateTournamentInfo(tournament);
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
     stopLoading();
 }
Exemplo n.º 2
0
        private void bTournament_Click(object sender, EventArgs e)
        {
            try
            {
                ChooseTournament choose = new ChooseTournament();
                choose.ShowDialog();
                if (choose.chosenTournament != null)
                {
                    if ((tournament != null) && (tournament.mysql != null))
                        tournament.mysql.close();

                    tournament = choose.chosenTournament;
                    tournament.mysql.connect();

                    lTournament.Text = tournament.name;
                    lType.Text = tournament.type == 1 ? "Pary" : "Teamy";
                    lSections.Text = tournament.getSectionsNum();
                    lTables.Text = tournament.getTablesNum();
                    bSync.Enabled = true;
                    bAutoSync.Enabled = true;
                    eInterval.Enabled = true;
                    if (tournament.type == 2)
                    {
                        lSkok.Visible = true;
                        lNazwyTeamow.Visible = true;
                    }
                    else
                    {
                        lSkok.Visible = false;
                        lNazwyTeamow.Visible = false;
                    }
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }