Update MainForm

This commit is contained in:
efrick 2024-08-05 18:19:39 -04:00
parent 71f34c7cca
commit 903bc4880f

View File

@ -4,13 +4,17 @@ namespace PDF_Merge
{
public partial class MainForm : Form
{
string pdfPath = ConfigurationManager.AppSettings["PDF-Output"] + Path.DirectorySeparatorChar + ConfigurationManager.AppSettings["PDF-Name"];
public MainForm()
{
InitializeComponent();
SetPathLable();
}
private static string getOutputPath()
{
string pdfPath = ConfigurationManager.AppSettings["PDF-Output"] + Path.DirectorySeparatorChar + ConfigurationManager.AppSettings["PDF-Name"];
return pdfPath;
}
public void SetPathLable()
{
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
@ -37,7 +41,7 @@ namespace PDF_Merge
{
srcPathLable.Text = "No path has been configured.";
}
outputLable.Text = "Output Path: " + pdfPath;
outputLable.Text = "Output Path: " + getOutputPath();
}
private void Form1_Load(object sender, EventArgs e)
@ -49,7 +53,7 @@ namespace PDF_Merge
{
string[] pdf_files = MergePDFs.CollectPdfFiles();
MergePDFs.MergePdfFiles(pdf_files, pdfPath);
MergePDFs.MergePdfFiles(pdf_files, getOutputPath());
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)