private void mnuCancel_Click(object sender, EventArgs e) { txtCarName.Text = ""; txtFilename.Text = ""; mSightings = null; this.Close(); }
public frmAddEditCar(Sightings sightingObj) { InitializeComponent(); txtCarName.Text = sightingObj.CarName; txtFilename.Text = sightingObj.CarLogoFileName; mSightings = sightingObj; }
private void mnuAddCar_Click(object sender, EventArgs e) { frmAddEditCar addForm = new frmAddEditCar(); addForm.ShowDialog(); if (addForm.txtCarName.Text.Trim().Length > 0) { Sightings sighting = new Sightings(addForm.txtCarName.Text.Trim(), addForm.txtFilename.Text.Trim(), new List<DateTime>()); Program.CarSightings.Add(sighting); } RefreshItems(); }
public frmManageCar(Sightings sighting) { InitializeComponent(); mSighting = sighting; RefreshItems(); }