private void bExec_Click(object sender, EventArgs e) { if (tabControl.TabCount != 0) { String ruta = tabControl.SelectedTab.Text; String texto = tabControl.SelectedTab.Controls["texto"].Text; String busqueda = "Pestaña"; StringComparison comparasion = StringComparison.InvariantCultureIgnoreCase; if (!ruta.StartsWith(busqueda, comparasion)) { String path = Path.GetDirectoryName(ruta); String archivo = Path.GetFileName(ruta); Constantes.RUTA_COMPILACION = path + "\\"; Interprete interprete = new Interprete(texto, archivo); interprete.Analizar(); interprete.Ejecutar(); txtSalida.Text = Interprete.Salida; loadImages(); } } }