private void button1_Click(object sender, EventArgs e) { FormConexion dlg = new FormConexion(Grupo); dlg.ShowDialog(); CargaConexiones(); }
private void ListaConexiones_DoubleClick(object sender, EventArgs e) { if (ListaConexiones.SelectedIndex == -1) { return; } string s = (string)ListaConexiones.Items[ListaConexiones.SelectedIndex]; string NombreArchivo = s; string archivo = DirConexiones + "\\" + NombreArchivo; if (!System.IO.File.Exists(archivo)) { MessageBox.Show("No se encontro la conexion"); return; } // System.IO.StreamReader rt; // rt = System.IO.File.OpenText(archivo); // s = rt.ReadLine(); // rt.Close(); FormConexion dlg = new FormConexion(Grupo); dlg.Nombre = NombreArchivo; dlg.ConnectionString = s; dlg.ShowDialog(); CargaConexiones(); }