private void btnAddDB_Click(object sender, EventArgs e)
 {
    AddDBForm addDBForm = new AddDBForm(dbconfig);
    addDBForm.ShowDialog();
    if (addDBForm.dbAdded != null && !addDBForm.dbAdded.Equals(""))
    {
        updateDBList();
        for (int i = 0; i < cmbDBs.Items.Count; i++)
        {
            if (cmbDBs.Items[i].ToString().Equals(addDBForm.dbAdded))
            {
                cmbDBs.SelectedIndex = i;
                break;
            }
        }
    }
    addDBForm.Dispose();
 }
 private void btnAddDB_Click(object sender, EventArgs e)
 {
     AddDBForm addDBForm = new AddDBForm(dbconfig);
     DialogResult result = addDBForm.ShowDialog();
     if (DialogResult.OK.Equals(result))
     {
         dbconfig.DbName = addDBForm.dbAdded != null && !"".Equals(addDBForm.dbAdded) ? addDBForm.dbAdded : dbconfig.DbName;
         updateCmbDBsItems(true);
     }
 }