private void agregarLenguajeToolStripMenuItem1_Click(object sender, EventArgs e) { Traductor leng = new Traductor(); string NuevoIdioma; NuevoIdioma = Microsoft.VisualBasic.Interaction.InputBox("Ingrese el nombre del nuevo idioma a agregar", "Agregar Idioma", "", 100, 0); if (NuevoIdioma.Length == 0) { MessageBox.Show("se cancelo el ingreso de nuevo idioma"); return; } List <String> ValueList = new List <String>(); int count = 0; ResXResourceReader rsxr = new ResXResourceReader(@".\ingles.resx"); // Iterate through the resources and display the contents to the console. foreach (DictionaryEntry d in rsxr) { string Value; Value = Microsoft.VisualBasic.Interaction.InputBox("Ingrese la traduccion en " + NuevoIdioma + " de: " + d.Key.ToString(), "Traductor", "", 100, 0); ValueList.Add(Value); if (Value.Length == 0) { MessageBox.Show("se cancelo el ingreso de nuevo idioma"); return; } } using (ResXResourceWriter resx = new ResXResourceWriter(@".\" + NuevoIdioma + ".resx")) { foreach (DictionaryEntry d in rsxr) { resx.AddResource(d.Key.ToString(), ValueList[count]); count = count + 1; } } leng.Insertar(NuevoIdioma); MessageBox.Show("Lenguaje creado correctamente"); }