Logic to support the PDFFilePrefix and PDFFileSuffix settings

Added text boxes for PDFFilePrefix and PDFFileSuffix settings
This commit is contained in:
2014-01-17 22:20:34 +00:00
parent c535af5bc2
commit ad0dc4e2ca
3 changed files with 1905 additions and 1839 deletions

View File

@@ -285,6 +285,8 @@ namespace VEPROMS
private Timer _MyTimer;
private void SetupForProcedure()
{
string PDFFilePrefix = _DocVersionConfig.Print_PDFFilePrefix;
string PDFFileSuffix = _DocVersionConfig.Print_PDFFileSuffix;
if(_DocVersionInfo == null)this.Text = "Create PDF for " + ProcNum;
// get list of previous pdf files
// if no previous pdf file, then get path from frmVersionProperties
@@ -292,12 +294,18 @@ namespace VEPROMS
//cbxPDF.Text = string.Format(@"{0}\{1}.pdf", _PDFPath, _ProcNum);
// General 2 settings
//txbPDFLocation.Text = _PDFPath;
string PDFFileName = "";
if (ProcNum == string.Empty)
txbPDFName.Text = this.UnitNumber + ".pdf";
//txbPDFName.Text = this.UnitNumber + ".pdf";
PDFFileName = this.UnitNumber;
else
txbPDFName.Text = string.Format("{0}.pdf", _MyProcedure.PDFNumber);
if (txbPDFName.Text.StartsWith("*"))
txbPDFName.Text = txbPDFName.Text.Replace("*", this.UnitNumber);
//txbPDFName.Text = string.Format("{0}.pdf", _MyProcedure.PDFNumber);
PDFFileName = string.Format("{0}", _MyProcedure.PDFNumber);
//if (txbPDFName.Text.StartsWith("*"))
// txbPDFName.Text = txbPDFName.Text.Replace("*", this.UnitNumber);
if (PDFFileName.StartsWith("*"))
PDFFileName = PDFFileName.Replace("*", this.UnitNumber);
txbPDFName.Text = PDFFilePrefix + PDFFileName + PDFFileSuffix + ".pdf";
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
if(SelectedSlave > 0) pc.SelectedSlave = SelectedSlave;
if (pc != null)