Beispiel #1
0
        private void addBtn_Click(object sender, EventArgs e)
        {
            Vehicul v    = new Vehicul();
            Form2   frm2 = new Form2(v);

            frm2.ShowDialog();
            parc = parc + v;
            listView1.Items.Clear();
            foreach (Vehicul veh in vehiculs)
            {
                ListViewItem itm = new ListViewItem(veh.ModelMasina);

                itm.SubItems.Add(veh.AnFabricatie.ToString());
                itm.SubItems.Add(veh.Pret.ToString());
                listView1.Items.Add(itm);
            }
        }
Beispiel #2
0
 public Form1()
 {
     InitializeComponent();
     vehiculs = new List <Vehicul>();
     parc     = new Parc(vehiculs);
 }