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:
11
ConfForm.cs
11
ConfForm.cs
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user