private void newConnectionToolStripMenuItem_Click(object sender, EventArgs e) { NewConnection newConnForm = new NewConnection(); if (newConnForm.ShowDialog(this) == DialogResult.OK) { Properties.Settings.Default.ConnectionStrings.Add("[" + newConnForm.ConnName + "]Data Source=10.209.41.166:1521/" + newConnForm.DSName.ToUpper() + ";User ID=viewer;Password=cprt_hsi;Unicode=True"); Properties.Settings.Default.Save(); } }