コード例 #1
0
 private void lbEvents_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lbEvents.SelectedIndex >= 0)
     {
         BJJEvent evt = (BJJEvent)lbEvents.SelectedItem;
         lbCompetitors.DataSource    = evt.Competitors.OrderBy(item => item.Name).ToList();
         lbCompetitors.DisplayMember = "DisplayName";
         lbAcademies.DataSource      = evt.GetAcademyList();
     }
 }
コード例 #2
0
        private void btnGetCompetitors_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            BJJEvent evt = (BJJEvent)lbEvents.SelectedItem;

            for (char c = 'a'; c <= 'z'; c++)
            {
                string s = getData("https://bjjcomp.com/lib/searchcompetitor.php?event=" + evt.ID + "&q=" + c);
                evt.AddCompetitors(s);
            }
            lbCompetitors.DataSource    = evt.Competitors.OrderBy(item => item.Name).ToList();
            lbCompetitors.DisplayMember = "DisplayName";
            lbAcademies.DataSource      = evt.GetAcademyList();
            GetAllBrackets();

            Cursor.Current = Cursors.Default;
        }