Ejemplo n.º 1
0
 private void reload()
 {
     lskids.Clear();
     swdata.moveFirst();
     while (swdata.hasMoreElements())
     {
         Swimmer sw = swdata.getSwimmer();
         lskids.Add(sw.getName());
     }
 }
Ejemplo n.º 2
0
        private void btClone_Click(object sender, EventArgs e)
        {
            int i = lskids.SelectedIndex();

            if (i >= 0)
            {
                Swimmer sw = swdata.getSwimmer(i);
                lsnewKids.Add(sw.getName() + "\t" + sw.getTime());
                lskids.clearSelection();
            }
        }
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();
        }
 public void Add(Swimmer sw)
 {
     listbox.Items.Add(sw.getName() + "\t" + sw.getTime());
 }
Ejemplo n.º 5
0
        //---------
        public int CompareTo(object swo)
        {
            Swimmer sw = (Swimmer)swo;

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