コード例 #1
0
ファイル: Form1.cs プロジェクト: roberteftene/PAWreCAP
        private void button1_Click(object sender, EventArgs e)
        {
            Vehicul         vehicul  = new Vehicul();
            AdaugareVehicul adaugare = new AdaugareVehicul(vehicul);

            adaugare.ShowDialog();
            p = p + vehicul;
            listViewVehicule.Items.Clear();
            foreach (Vehicul v in vehiculs)
            {
                ListViewItem listViewItem = new ListViewItem(v.ModelMasina);
                listViewItem.SubItems.Add(v.AnFabricatie.ToString());
                listViewItem.SubItems.Add(v.Pret.ToString());

                listViewVehicule.Items.Add(listViewItem);
                listViewItem.Tag = v;
            }
        }
コード例 #2
0
        public AdaugareVehicul(Vehicul vehicul)
        {
            this.vehicul = vehicul;

            InitializeComponent();
        }