Update the variable used for the output path.

This commit is contained in:
efrick 2024-08-05 14:54:00 -04:00
parent c5f3410b25
commit 2a78fdc2a4

View File

@ -4,6 +4,7 @@ namespace PDF_Merge
{
public partial class MainForm : Form
{
string pdfPath = ConfigurationManager.AppSettings["PDF-Output"] + Path.DirectorySeparatorChar + ConfigurationManager.AppSettings["PDF-Name"];
public MainForm()
{
InitializeComponent();
@ -13,9 +14,6 @@ namespace PDF_Merge
public void SetPathLable()
{
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
string outputPath = ConfigurationManager.AppSettings["PDF-Output"];
string outputFile = ConfigurationManager.AppSettings["PDF-Name"];
string fullOutPath = outputPath + "/" + outputFile;
if (sourcePath != null)
{
@ -39,7 +37,7 @@ namespace PDF_Merge
{
srcPathLable.Text = "No path has been configured.";
}
outputLable.Text = "Output Path: " + fullOutPath;
outputLable.Text = "Output Path: " + pdfPath;
}
private void Form1_Load(object sender, EventArgs e)
@ -55,7 +53,7 @@ namespace PDF_Merge
private void button1_Click(object sender, EventArgs e)
{
string[] pdf_files = MergePDFs.CollectPdfFiles();
string pdfPath = ConfigurationManager.AppSettings["PDF-Output"] + "/" + ConfigurationManager.AppSettings["PDF-Name"];
MergePDFs.MergePdfFiles(pdf_files, pdfPath);
}