Basic working program.

It will merge PDFs from a directory. Configuration is currently all
manual.
This commit is contained in:
2024-08-01 16:16:53 -04:00
parent 373b83b97c
commit ea1de129ed
18 changed files with 1675 additions and 113 deletions

65
MainForm.cs Normal file
View File

@@ -0,0 +1,65 @@
using System.Configuration;
namespace PDF_Merge
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
if (sourcePath != null)
{
if (sourcePath != "")
{
if (Directory.Exists(sourcePath))
{
pathLable.Text = pathLable.Text + sourcePath;
} else
{
pathLable.Text = "The configured path does not exist.";
}
} else
{
pathLable.Text = "The configured path is blank.";
}
} else
{
pathLable.Text = "No path has been configured.";
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string[] pdf_files = MergePDFs.CollectPdfFiles();
MergePDFs.MergePdfFiles(pdf_files, ConfigurationManager.AppSettings["PDF-Output"]);
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
AboutBox1 AboutWindow = new AboutBox1();
AboutWindow.Show();
}
private void configureToolStripMenuItem_Click(object sender, EventArgs e)
{
ConfForm ConfForm = new ConfForm();
ConfForm.Show();
}
}
}