QUOTED_IDENTIFIER ON

Show how long it takes to print all procedures
For Null values use Arial as a default font.
Added Try/Catch to PDFDocument.Close (In case page is empty)
Only output End Message if it exists
Pagination Fixes
This commit is contained in:
Rich
2011-09-22 17:44:01 +00:00
parent 591e17fa42
commit d24109fe19
5 changed files with 52 additions and 19 deletions

View File

@@ -331,12 +331,15 @@ namespace VEPROMS
// Determine change bar settings. First get from config & then see if override from dialog.
// Also check that format allows override.
ChangeBarDefinition cbd = DetermineChangeBarSettings();
int n = _DocVersionInfo.Procedures.Count;
int i = 0;
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
{
MyProcedure = myProc;
if (myProc.Sections != null)
{
SetupForProcedure();
this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text);
frmStatus.CloseWhenDone = true;
frmStatus.ShowDialog();
@@ -427,7 +430,16 @@ namespace VEPROMS
private void btnCreatePDF_Click(object sender, EventArgs e)
{
if (_AllProcedures)
{
DateTime dtStart = DateTime.Now;
CreatePDFs();
if (VlnSettings.DebugMode)
{
MessageBox.Show(string.Format("{0} Minutes to Print All Procedures"
, TimeSpan.FromTicks(DateTime.Now.Ticks - dtStart.Ticks).TotalMinutes),
"Printing Duration", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
else
CreatePDF();
}