Add a lable showing the configured output path.

This commit is contained in:
2024-08-05 14:43:42 -04:00
parent 072e59bd4a
commit c5f3410b25
2 changed files with 35 additions and 18 deletions

View File

@@ -13,28 +13,33 @@ 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)
{
if (sourcePath != "")
{
if (Directory.Exists(sourcePath))
{
pathLable.Text = "Path: " + sourcePath;
srcPathLable.Text = "Source Path: " + sourcePath;
}
else
{
pathLable.Text = "The configured path does not exist.";
srcPathLable.Text = "The configured path does not exist.";
}
}
else
{
pathLable.Text = "The configured path is blank.";
srcPathLable.Text = "The configured path is blank.";
}
}
else
{
pathLable.Text = "No path has been configured.";
srcPathLable.Text = "No path has been configured.";
}
outputLable.Text = "Output Path: " + fullOutPath;
}
private void Form1_Load(object sender, EventArgs e)