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);
     }
 }
Ejemplo n.º 2
0
        private void btnAddCar_Click(object sender, EventArgs e)
        {
            AddNewCarForm addForm = AddNewCarForm.GetInstances(this);

            addForm.Show();
        }