private void cmdSelectTargetDB_Click(object sender, EventArgs e) { frmConnectionString frm = new frmConnectionString(); frm.ConnectionString = txtTargetDB.Text; if (frm.ShowDialog() == DialogResult.OK) { txtTargetDB.Text = frm.ConnectionString; var configManager = new DBUpdateManager.Core.Config.ConfigManager(); var configEntity = configManager.ReadConfig(); configEntity.CarpetaDeIncidencias = frm.ConnectionString; LimpiarArbol(tvwTarget); registroDeIncidencias.Clear(); LeerIncidenciasAplicadas(); try { configManager.WriteConfig(configEntity); } catch (Exception ex) { string mensaje = "Las incidencias aplicadas han sido cargadas, pero no se ha podido guardar la ConnectionString actual"; MessageBox.Show(mensaje); } } }
private void cmdSelectSourceFolder_Click(object sender, EventArgs e) { FolderBrowserDialog folder = new FolderBrowserDialog(); if (folder.ShowDialog() == DialogResult.OK) { txtSourceFolder.Text = folder.SelectedPath; var configManager = new DBUpdateManager.Core.Config.ConfigManager(); var configEntity = configManager.ReadConfig(); configEntity.CarpetaDeIncidencias = folder.SelectedPath; configManager.WriteConfig(configEntity); LeerRepositorioDeIncidencias(); } }