Пример #1
0
        public Form1()
        {
            InitializeComponent();
            truck = new Truck();
            lstTrucks = new List<Truck>();

            // can only set allow-drop by code
            groupBox1.AllowDrop = true;
        }
Пример #2
0
 private void btnAddTruck_Click(object sender, EventArgs e)
 {
     truck = new Truck(tbxTrNo.Text, tbxDriverName.Text,
         tbxDriverLicense.Text, tbxTruckCondition.Text);
     lsvTruck.Items.Add(truck.ToString());
 }