The date format is now selectable.

Added the form controls and AppSettings keys to allow the user to select
the format of the date appended to the output file.
Further update to issue #1.
This commit is contained in:
2024-08-06 10:37:42 -04:00
parent 1e75972ae9
commit 3b57fb0edf
6 changed files with 82 additions and 35 deletions

63
ConfForm.Designer.cs generated
View File

@@ -30,8 +30,8 @@ namespace PDF_Merge
/// </summary>
private void InitializeComponent()
{
saveBtn = new Button();
cancelBtn = new Button();
SaveBtn = new Button();
CancelBtn = new Button();
sourceBox = new TextBox();
outputBox = new TextBox();
folderBrowserDialog1 = new FolderBrowserDialog();
@@ -44,27 +44,28 @@ namespace PDF_Merge
FileNameBox = new TextBox();
fileExtlabel = new Label();
appendDatecheckBox = new CheckBox();
dateFormatOpts = new ComboBox();
SuspendLayout();
//
// saveBtn
// SaveBtn
//
saveBtn.Location = new Point(327, 227);
saveBtn.Name = "saveBtn";
saveBtn.Size = new Size(112, 34);
saveBtn.TabIndex = 0;
saveBtn.Text = "Save";
saveBtn.UseVisualStyleBackColor = true;
saveBtn.Click += saveBtn_Click;
SaveBtn.Location = new Point(327, 227);
SaveBtn.Name = "SaveBtn";
SaveBtn.Size = new Size(112, 34);
SaveBtn.TabIndex = 0;
SaveBtn.Text = "Save";
SaveBtn.UseVisualStyleBackColor = true;
SaveBtn.Click += SaveBtn_Click;
//
// cancelBtn
// CancelBtn
//
cancelBtn.Location = new Point(193, 227);
cancelBtn.Name = "cancelBtn";
cancelBtn.Size = new Size(112, 34);
cancelBtn.TabIndex = 1;
cancelBtn.Text = "Cancel";
cancelBtn.UseVisualStyleBackColor = true;
cancelBtn.Click += cancelBtn_Click;
CancelBtn.Location = new Point(193, 227);
CancelBtn.Name = "CancelBtn";
CancelBtn.Size = new Size(112, 34);
CancelBtn.TabIndex = 1;
CancelBtn.Text = "Cancel";
CancelBtn.UseVisualStyleBackColor = true;
CancelBtn.Click += CancelBtn_Click;
//
// sourceBox
//
@@ -118,7 +119,7 @@ namespace PDF_Merge
sourceDirBtn.TabIndex = 7;
sourceDirBtn.Text = "...";
sourceDirBtn.UseVisualStyleBackColor = true;
sourceDirBtn.Click += sourceDirBtn_Click;
sourceDirBtn.Click += SourceDirBtn_Click;
//
// outPathBtn
//
@@ -128,7 +129,7 @@ namespace PDF_Merge
outPathBtn.TabIndex = 8;
outPathBtn.Text = "...";
outPathBtn.UseVisualStyleBackColor = true;
outPathBtn.Click += outPathBtn_Click;
outPathBtn.Click += OutPathBtn_Click;
//
// FileLable
//
@@ -164,12 +165,23 @@ namespace PDF_Merge
appendDatecheckBox.TabIndex = 12;
appendDatecheckBox.Text = "Append Date";
appendDatecheckBox.UseVisualStyleBackColor = true;
appendDatecheckBox.CheckedChanged += AppendDatecheckBox_CheckedChanged;
//
// dateFormatOpts
//
dateFormatOpts.FormattingEnabled = true;
dateFormatOpts.Items.AddRange(new object[] { "yyyy-MM-dd", "MM-dd-yyyy" });
dateFormatOpts.Location = new Point(321, 188);
dateFormatOpts.Name = "dateFormatOpts";
dateFormatOpts.Size = new Size(182, 33);
dateFormatOpts.TabIndex = 13;
//
// ConfForm
//
AutoScaleDimensions = new SizeF(10F, 25F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(500, 282);
ClientSize = new Size(546, 282);
Controls.Add(dateFormatOpts);
Controls.Add(appendDatecheckBox);
Controls.Add(fileExtlabel);
Controls.Add(FileNameBox);
@@ -181,8 +193,8 @@ namespace PDF_Merge
Controls.Add(sourceLabel);
Controls.Add(outputBox);
Controls.Add(sourceBox);
Controls.Add(cancelBtn);
Controls.Add(saveBtn);
Controls.Add(CancelBtn);
Controls.Add(SaveBtn);
Name = "ConfForm";
Text = "Configure";
ResumeLayout(false);
@@ -191,8 +203,8 @@ namespace PDF_Merge
#endregion
private Button saveBtn;
private Button cancelBtn;
private Button SaveBtn;
private Button CancelBtn;
private TextBox sourceBox;
private TextBox outputBox;
private FolderBrowserDialog folderBrowserDialog1;
@@ -205,5 +217,6 @@ namespace PDF_Merge
private TextBox FileNameBox;
private Label fileExtlabel;
private CheckBox appendDatecheckBox;
private ComboBox dateFormatOpts;
}
}