private void btnGenerar_Click(object sender, EventArgs e) { try { SeparadorPdf.SepararPdf(txtInputFile.Text, txtDirectory.Text); MessageBox.Show(this, Resources.ProcesoCorrecto, Resources.NombreApp, MessageBoxButtons.OK); Process.Start(txtDirectory.Text); } catch (Exception ex) { MessageBox.Show(this, ex.Message, Resources.Generar_Error, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
static void Main(string[] args) { if (args == null || args.Length != 2) { MostrarUso(); } else { try { SeparadorPdf.SepararPdf(args[0], args[1]); } catch (Exception ex) { Console.WriteLine("Error: {0}", ex.Message); MostrarUso(); } } }