private void btnAdd_Click(object sender, EventArgs e) { frmInputBox input = new frmInputBox(); DialogResult dRslt = input.ShowDialog(); if (dRslt != DialogResult.OK) { return; } string con = input.ArcGISConnection; input.Dispose(); if (msUtil.getServiceConnection(con) == null) { MessageBox.Show("Can't connect to ArcGIS server " + con); return; } msUtil.updateConnectionTable(con); msUtil.updateServiceTable(con); loadConnection(); cmbCon.SelectedItem = con; }