Ejemplo n.º 1
0
 private void reload()
 {
     lsKids.Items.Clear();
     swdata.moveFirst();
     while (swdata.hasMoreElements())
     {
         Swimmer sw = swdata.getSwimmer();
         lsKids.Items.Add(sw.getName());
     }
 }
Ejemplo n.º 2
0
        private void btClone_Click(object sender, System.EventArgs e)
        {
            SwimData newSd = (SwimData)swdata.Clone();

            newSd.sort();
            while (newSd.hasMoreElements())
            {
                Swimmer sw = (Swimmer)newSd.getSwimmer();
                lsNewKids.Items.Add(sw.getName());
            }
        }
Ejemplo n.º 3
0
        //-----
        public SwimData(string filename)
        {
            swdata = new ArrayList();
            csFile fl = new csFile(filename);

            fl.OpenForRead();
            string s = fl.readLine();

            while (s != null)
            {
                Swimmer sw = new Swimmer(s);
                swdata.Add(sw);
                s = fl.readLine();
            }
            fl.close();
        }
Ejemplo n.º 4
0
        //---------
        public int CompareTo(object swo)
        {
            Swimmer sw = (Swimmer)swo;

            return(lname.CompareTo(sw.getLName()));
        }