Appending a date to the output file is now working.

This commit should resolve issue #1. Appending a date to the output file
is now a selectable option in the app configuration.
This commit is contained in:
2024-08-06 09:53:40 -04:00
parent 8c5d3f9e06
commit 1e75972ae9
5 changed files with 54 additions and 2 deletions

View File

@@ -20,10 +20,13 @@ namespace PDF_Merge
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
string outputPath = ConfigurationManager.AppSettings["PDF-Output"];
string outputName = ConfigurationManager.AppSettings["PDF-Name"];
string outputExt = ConfigurationManager.AppSettings["PDF-Extension"];
sourceBox.Text = sourcePath;
outputBox.Text = outputPath;
FileNameBox.Text = outputName;
fileExtlabel.Text = outputExt;
if (ConfigurationManager.AppSettings["overwrite"] == true.ToString())
{
overrideCBox.Checked = true;
@@ -32,6 +35,13 @@ namespace PDF_Merge
{
overrideCBox.Checked = false;
}
if (ConfigurationManager.AppSettings["appendDate"] == true.ToString() )
{
appendDatecheckBox.Checked = true;
} else
{
appendDatecheckBox.Checked = false;
}
}
private void cancelBtn_Click(object sender, EventArgs e)
@@ -68,6 +78,7 @@ namespace PDF_Merge
MessageBox.Show("File must be named.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
appSettings.Settings["overwrite"].Value = overrideCBox.Checked.ToString();
appSettings.Settings["appendDate"].Value = appendDatecheckBox.Checked.ToString();
appConfig.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
this.Close();