Exemple #1
0
        private void cbClubs_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            string           club = (String)cbClubs.SelectedItem;
            FilteredIterator iter = kdata.getFilteredIterator(club);

            lsClubKids.Items.Clear();
            while (iter.MoveNext())
            {
                Kid kd = (Kid)iter.Current;
                lsClubKids.Items.Add(kd.getFrname() + " " + kd.getLname());
            }
        }
Exemple #2
0
        private void init()
        {
            kdata = new KidData("50free.txt");
            KidIterator kiter = kdata.getIterator();

            while (kiter.MoveNext())
            {
                Kid kd = (Kid)kiter.Current;
                lsKids.Items.Add(kd.getFrname() + " " + kd.getLname());
            }
            IDictionaryEnumerator clubiter = kdata.getClubs();

            while (clubiter.MoveNext())
            {
                cbClubs.Items.Add((string)clubiter.Value);
            }
        }