public static AddNewCarForm GetInstances(CarForm parent)
 {
     if (instances != null)
     {
         return(instances);
     }
     if (instances == null)
     {
         return(instances = new AddNewCarForm(parent));
     }
     if (instances.IsDisposed)
     {
         return(instances = new AddNewCarForm(parent));
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
        private void btnAddCar_Click(object sender, EventArgs e)
        {
            AddNewCarForm addForm = AddNewCarForm.GetInstances(this);

            addForm.Show();
        }