private void buttonExtraerImagenes_Click(object sender, EventArgs e) { if (this.rutaCarpetaGuardar != null && comboBoxFormatos.Text != null && textBoxNombreOut.Text != null) { var nombreOut = textBoxNombreOut.Text; var formatoOut = comboBoxFormatos.Text; var tiempo = "00:00"; var cantFrames = (double)numericUpDownXFrames.Value; if (siticoneToggleSwitchxTiempo.Checked == true) { tiempo = textBoxTiempoCustom.Text; } var nombreNew = nombreOut.Trim(); var nombreProcesado = nombreNew.Replace(" ", "_"); ffmpeg.extraerImagenes(this.rutaArchivoSeleccionado, cantFrames, tiempo, this.rutaCarpetaGuardar, nombreProcesado, formatoOut); formApp.mostarEstado("Se extrajeron las imagenes con exito", "Completado con exito", true); this.Close(); } else { formApp.mostarEstado("Ingrese los campos requeridos", "Campos incompletos", false); } }
private void buttonFormato_Click(object sender, EventArgs e) { nombreOut = textBoxNombreOut.Text; if (nombreOut.Length == 0 || rutaCarpetaGuardar.Length == 0) { formApp.mostarEstado("Ingrese el nombre del archivo y/o la ruta de destino", "Error", false); } else if (checkBoxMp4.Checked || checkBoxMp3.Checked || checkBoxMpeg.Checked || checkBoxAvi.Checked || checkBoxFlv.Checked) { funcionCheck(checkBoxMp4, ".mp4"); funcionCheck(checkBoxMp3, ".mp3"); funcionCheck(checkBoxMpeg, ".mpeg"); funcionCheck(checkBoxAvi, ".avi"); funcionCheck(checkBoxFlv, ".flv"); formApp.mostarEstado("La conversion se realizo con exito", "Finalizado", true); this.Close(); } else { formApp.mostarEstado("Seleccione al menos un opcion", "Campos insuficientes", false); } }
private void buttonCambiarResolucion_Click(object sender, EventArgs e) { if (checkPersonalizada() == true && textBoxNumX.TextLength == 0 || checkPersonalizada() == true && textBoxNumY.TextLength == 0 || checkPersonalizada() == false && comboBoxResoluciones.Text.Length == 0 || checkCampos()) { formPrincipal.mostarEstado("Ingresa la resolucion y el nombre deseado", "Campos insuficientes", false); } else { try { var x = int.Parse(obtenerX()); var y = int.Parse(obtenerY()); var nombreOut = procesarNombre(textBoxNombreOut.Text) + cortarFormato(this.rutaArchivoSeleccionado); ffmpeg.cambiarResolucion(rutaArchivoSeleccionado, rutaArchivoNuevo, nombreOut, x, y); formPrincipal.mostarEstado("Se cambio la resolucion con exito", "Exito", true); this.Close(); } catch (Exception exc) { formPrincipal.mostarEstado("Ingresa solo numeros\nPor Ejemplo X:1920 Y:1080", "Resolucion Personalizada", false); } } }