Add a lable showing the configured output path.
This commit is contained in:
parent
072e59bd4a
commit
c5f3410b25
40
MainForm.Designer.cs
generated
40
MainForm.Designer.cs
generated
@ -36,13 +36,14 @@
|
|||||||
aboutToolStripMenuItem = new ToolStripMenuItem();
|
aboutToolStripMenuItem = new ToolStripMenuItem();
|
||||||
configureToolStripMenuItem = new ToolStripMenuItem();
|
configureToolStripMenuItem = new ToolStripMenuItem();
|
||||||
exitToolStripMenuItem = new ToolStripMenuItem();
|
exitToolStripMenuItem = new ToolStripMenuItem();
|
||||||
pathLable = new Label();
|
srcPathLable = new Label();
|
||||||
|
outputLable = new Label();
|
||||||
menuStrip1.SuspendLayout();
|
menuStrip1.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// mergeButton
|
// mergeButton
|
||||||
//
|
//
|
||||||
mergeButton.Location = new Point(107, 193);
|
mergeButton.Location = new Point(167, 193);
|
||||||
mergeButton.Name = "mergeButton";
|
mergeButton.Name = "mergeButton";
|
||||||
mergeButton.Size = new Size(211, 100);
|
mergeButton.Size = new Size(211, 100);
|
||||||
mergeButton.TabIndex = 0;
|
mergeButton.TabIndex = 0;
|
||||||
@ -62,7 +63,7 @@
|
|||||||
menuStrip1.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem });
|
menuStrip1.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem });
|
||||||
menuStrip1.Location = new Point(0, 0);
|
menuStrip1.Location = new Point(0, 0);
|
||||||
menuStrip1.Name = "menuStrip1";
|
menuStrip1.Name = "menuStrip1";
|
||||||
menuStrip1.Size = new Size(421, 33);
|
menuStrip1.Size = new Size(539, 33);
|
||||||
menuStrip1.TabIndex = 2;
|
menuStrip1.TabIndex = 2;
|
||||||
menuStrip1.Text = "menuStrip1";
|
menuStrip1.Text = "menuStrip1";
|
||||||
//
|
//
|
||||||
@ -98,22 +99,32 @@
|
|||||||
exitToolStripMenuItem.Text = "Exit";
|
exitToolStripMenuItem.Text = "Exit";
|
||||||
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
|
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// pathLable
|
// srcPathLable
|
||||||
//
|
//
|
||||||
pathLable.AutoSize = true;
|
srcPathLable.AutoSize = true;
|
||||||
pathLable.Location = new Point(59, 109);
|
srcPathLable.Location = new Point(59, 86);
|
||||||
pathLable.Name = "pathLable";
|
srcPathLable.Name = "srcPathLable";
|
||||||
pathLable.Size = new Size(55, 25);
|
srcPathLable.Size = new Size(114, 25);
|
||||||
pathLable.TabIndex = 3;
|
srcPathLable.TabIndex = 3;
|
||||||
pathLable.Text = "Path: ";
|
srcPathLable.Text = "Source Path: ";
|
||||||
pathLable.Click += label1_Click;
|
srcPathLable.Click += label1_Click;
|
||||||
|
//
|
||||||
|
// outputLable
|
||||||
|
//
|
||||||
|
outputLable.AutoSize = true;
|
||||||
|
outputLable.Location = new Point(59, 126);
|
||||||
|
outputLable.Name = "outputLable";
|
||||||
|
outputLable.Size = new Size(117, 25);
|
||||||
|
outputLable.TabIndex = 4;
|
||||||
|
outputLable.Text = "Output Path: ";
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(10F, 25F);
|
AutoScaleDimensions = new SizeF(10F, 25F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(421, 387);
|
ClientSize = new Size(539, 387);
|
||||||
Controls.Add(pathLable);
|
Controls.Add(outputLable);
|
||||||
|
Controls.Add(srcPathLable);
|
||||||
Controls.Add(menuStrip1);
|
Controls.Add(menuStrip1);
|
||||||
Controls.Add(mergeButton);
|
Controls.Add(mergeButton);
|
||||||
MainMenuStrip = menuStrip1;
|
MainMenuStrip = menuStrip1;
|
||||||
@ -136,6 +147,7 @@
|
|||||||
private ToolStripMenuItem aboutToolStripMenuItem;
|
private ToolStripMenuItem aboutToolStripMenuItem;
|
||||||
private ToolStripMenuItem configureToolStripMenuItem;
|
private ToolStripMenuItem configureToolStripMenuItem;
|
||||||
private ToolStripMenuItem exitToolStripMenuItem;
|
private ToolStripMenuItem exitToolStripMenuItem;
|
||||||
private Label pathLable;
|
private Label srcPathLable;
|
||||||
|
private Label outputLable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
MainForm.cs
13
MainForm.cs
@ -13,28 +13,33 @@ namespace PDF_Merge
|
|||||||
public void SetPathLable()
|
public void SetPathLable()
|
||||||
{
|
{
|
||||||
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
|
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 != null)
|
||||||
{
|
{
|
||||||
if (sourcePath != "")
|
if (sourcePath != "")
|
||||||
{
|
{
|
||||||
if (Directory.Exists(sourcePath))
|
if (Directory.Exists(sourcePath))
|
||||||
{
|
{
|
||||||
pathLable.Text = "Path: " + sourcePath;
|
srcPathLable.Text = "Source Path: " + sourcePath;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pathLable.Text = "The configured path does not exist.";
|
srcPathLable.Text = "The configured path does not exist.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pathLable.Text = "The configured path is blank.";
|
srcPathLable.Text = "The configured path is blank.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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)
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user