Logic to support the PDFFilePrefix and PDFFileSuffix settings

Added text boxes for PDFFilePrefix and PDFFileSuffix settings
This commit is contained in:
John Jenko 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)

File diff suppressed because it is too large Load Diff

View File

@ -123,6 +123,12 @@
<metadata name="docVersionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>415, 17</value>
</metadata>
<metadata name="docVersionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>415, 17</value>
</metadata>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>643, 17</value>
</metadata>
<data name="ppCmbxFormat.SuperTooltip" xml:space="preserve">
<value>Allows you to specify the default format to use for all procedures in this set.
@ -209,11 +215,17 @@ Check "Show Default Settings" to display the "default" duplexing setting (below
<metadata name="bsMiniApple.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 17</value>
</metadata>
<metadata name="documentInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>357, 56</value>
</metadata>
<metadata name="bsMiniApple.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 17</value>
</metadata>
<metadata name="bsApples.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="documentInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>357, 56</value>
<metadata name="bsApples.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ROPrefixBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>238, 17</value>