Update MainForm
This commit is contained in:
parent
71f34c7cca
commit
903bc4880f
12
MainForm.cs
12
MainForm.cs
@ -4,13 +4,17 @@ namespace PDF_Merge
|
|||||||
{
|
{
|
||||||
public partial class MainForm : Form
|
public partial class MainForm : Form
|
||||||
{
|
{
|
||||||
string pdfPath = ConfigurationManager.AppSettings["PDF-Output"] + Path.DirectorySeparatorChar + ConfigurationManager.AppSettings["PDF-Name"];
|
|
||||||
public MainForm()
|
public MainForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
SetPathLable();
|
SetPathLable();
|
||||||
}
|
}
|
||||||
|
private static string getOutputPath()
|
||||||
|
{
|
||||||
|
string pdfPath = ConfigurationManager.AppSettings["PDF-Output"] + Path.DirectorySeparatorChar + ConfigurationManager.AppSettings["PDF-Name"];
|
||||||
|
return pdfPath;
|
||||||
|
}
|
||||||
public void SetPathLable()
|
public void SetPathLable()
|
||||||
{
|
{
|
||||||
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
|
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
|
||||||
@ -37,7 +41,7 @@ namespace PDF_Merge
|
|||||||
{
|
{
|
||||||
srcPathLable.Text = "No path has been configured.";
|
srcPathLable.Text = "No path has been configured.";
|
||||||
}
|
}
|
||||||
outputLable.Text = "Output Path: " + pdfPath;
|
outputLable.Text = "Output Path: " + getOutputPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Form1_Load(object sender, EventArgs e)
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
@ -49,7 +53,7 @@ namespace PDF_Merge
|
|||||||
{
|
{
|
||||||
string[] pdf_files = MergePDFs.CollectPdfFiles();
|
string[] pdf_files = MergePDFs.CollectPdfFiles();
|
||||||
|
|
||||||
MergePDFs.MergePdfFiles(pdf_files, pdfPath);
|
MergePDFs.MergePdfFiles(pdf_files, getOutputPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user