public Form1() { InitializeComponent(); truck = new Truck(); lstTrucks = new List<Truck>(); // can only set allow-drop by code groupBox1.AllowDrop = true; }
private void btnAddTruck_Click(object sender, EventArgs e) { truck = new Truck(tbxTrNo.Text, tbxDriverName.Text, tbxDriverLicense.Text, tbxTruckCondition.Text); lsvTruck.Items.Add(truck.ToString()); }