예제 #1
0
 private void mnuCancel_Click(object sender, EventArgs e)
 {
     txtCarName.Text = "";
     txtFilename.Text = "";
     mSightings = null;
     this.Close();
 }
예제 #2
0
 public frmAddEditCar(Sightings sightingObj)
 {
     InitializeComponent();
     txtCarName.Text = sightingObj.CarName;
     txtFilename.Text = sightingObj.CarLogoFileName;
     mSightings = sightingObj;
 }
예제 #3
0
        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();
        }
예제 #4
0
 public frmManageCar(Sightings sighting)
 {
     InitializeComponent();
     mSighting = sighting;
     RefreshItems();
 }