示例#1
0
 private void reload()
 {
     lskids.Clear();
     swdata.moveFirst();
     while (swdata.hasMoreElements())
     {
         Swimmer sw = swdata.getSwimmer();
         lskids.Add(sw.getName());
     }
 }
示例#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();
            }
        }
        //-----
        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());
 }
示例#5
0
        //---------
        public int CompareTo(object swo)
        {
            Swimmer sw = (Swimmer)swo;

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