private void btnAddDriver_Click(object sender, EventArgs e) { AddDriver f = new AddDriver(); if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) { lbDrivers.Items.Add(f.Result); } }
private void btnDodadiVozac_Click(object sender, EventArgs e) { AddDriver addD = new AddDriver(); DialogResult rezultat = addD.ShowDialog(); if (rezultat == System.Windows.Forms.DialogResult.OK) { lsVozaci.Items.Add(addD.vozac); } }