private void FAfegirGP_Load(object sender, EventArgs e) { // carrega comboBox pilots pilot[] pilots = new pilot[100]; pilot p = new pilot(); pilots = p.llegeixPilotFitxer(); carregaComboPilots(pilots); }
private void FModificarGP_Load(object sender, EventArgs e) { numGP = 0; pilot p = new pilot(); pilots = p.llegeixPilotFitxer(); carregaComboPilots(pilots); carregaTextBox(); Botonera(); }
private void carregaComboBox() { pilot[] pil = new pilot[100]; pilot p1 = new pilot(); pil = p1.llegeixPilotFitxer(); // carreguem els comboBox amb la escuderia (i) TBModNomPilot.Text = pil[numPil].Nom; TBModDorsal.Text = Convert.ToString(pil[numPil].Dorsal); TBModNacionalitat.Text = pil[numPil].Nacionalitat; CBModEscuderiaPilot.Text = pil[numPil].Escu.NomEsc; }
private void carregaTextBox() { pilot[] p = new pilot[100]; pilot p1 = new pilot(); p = p1.llegeixPilotFitxer(); // carreguem els comboBox amb la escuderia (i) TBNom.Text = p[numPilot].Nom; TBDorsal.Text = Convert.ToString(p[numPilot].Dorsal); TBNacionalitat.Text = p[numPilot].Nacionalitat; CBEscuderia.Text = p[numPilot].Esc.Nom; }
private void FMostrarPilots_Load(object sender, EventArgs e) { pilot [] esc = new pilot[100]; pilot es = new pilot(); //String fitxer = "fitxer/llibres.dat"; //esc = es.llegeixFitxerEscuderia(); esc = es.llegeixPilotFitxer(); int i = 0; do { RTBMostrarPil.Text = RTBMostrarPil.Text + "Nom Pilot: " + esc[i].Nom + "\nPais : " + esc[i].Nacionalitat + "\nDorsal: " + esc[i].Dorsal + "\nEscuderia : " + esc[i].Escu.NomEsc + "\n\n"; i++; } while (esc[i] != null); }
private void FMostraPilots_Load(object sender, EventArgs e) { pilot[] p = new pilot[100]; pilot p1 = new pilot(); p = p1.llegeixPilotFitxer(); int i = 0; do { RTText.Text = RTText.Text + "Pilot: " + p[i].Nom + " (" + p[i].Dorsal + ")" + "\nPais: " + p[i].Nacionalitat + "\nEscuderia: " + p[i].Esc.Nom + "\n\n"; i++; } while (p[i] != null); }