public void Add(Swimmer sw) { DataRow row = dTable.NewRow(); row["Frname"] = sw.getFrname(); row[1] = sw.getLName(); row[2] = sw.getAge(); //This one is an integer dTable.Rows.Add(row); dTable.AcceptChanges(); }
//------ public void Add(Swimmer sw) { TreeNode nod; //add a root node nod = tree.Nodes.Add(sw.getName()); //add a child node to it nod.Nodes.Add(sw.getTime().ToString()); tree.ExpandAll(); }
private void reload() { lskids.Clear(); m_lsKids.Clear(); swdata.moveFirst(); while (swdata.hasMoreElements()) { Swimmer sw = swdata.getSwimmer(); lskids.Add(sw.getName()); m_lsKids.Add(sw.getName()); } }
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()); m_lsNewKids.Add(sw); m_lsNewGridKids.Add(sw); m_lsKids.clearSelection(); 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 int CompareTo(object swo) { Swimmer sw = (Swimmer)swo; return(lname.CompareTo(sw.getLName())); }
public void Add(Swimmer sw) { listbox.Items.Add(sw.getName() + "\t" + sw.getTime()); }
//----- public void Add(Swimmer sw) { this.Items.Add(sw.getName() + "\t" + sw.getAge().ToString()); }