This commit is contained in:
2010-08-24 13:44:55 +00:00
parent a369a4a3dd
commit 3045458050
5 changed files with 775 additions and 563 deletions

View File

@@ -34,11 +34,11 @@ namespace VEPROMS
get { return _OpenPDF; }
set { _OpenPDF = value; }
}
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, string pdfPath)
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, string pdfPath, ChangeBarDefinition cbd)
{
OpenPDF = openPDF;
InitializeComponent();
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false);//openPDF);
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false, cbd);//openPDF);
PDFPath = pdfPath;
this.Text = "Creating PDF of " + myItem.DisplayNumber;
@@ -76,6 +76,11 @@ namespace VEPROMS
MyPromsPrinter.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged);
DateTime tStart = DateTime.Now;
_PdfFile = MyPromsPrinter.Print(PDFPath);
if (_PdfFile == null)
{
this.Close();
return;
}
DateTime tEnd = DateTime.Now;
MyStatus = _PdfFile + " created.";
MyStatus = string.Format("{0} created in {1:0.} milliseconds", _PdfFile, (TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks).TotalMilliseconds));