Show Progress bar when Printing all procedures
Added Cancel button for printing all procedures Added Timer for automatic processes
This commit is contained in:
@@ -218,7 +218,7 @@ namespace VEPROMS
|
||||
private Timer _MyTimer;
|
||||
private void SetupForProcedure()
|
||||
{
|
||||
this.Text = "Create PDF for " + ProcNum;
|
||||
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
|
||||
// dlgSelectFile.InitialDirectory = pdf path from frmVersionProperties
|
||||
@@ -392,19 +392,26 @@ namespace VEPROMS
|
||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||
int n = _DocVersionInfo.Procedures.Count;
|
||||
int i = 0;
|
||||
pbPDFsStatus.Maximum = n;
|
||||
pbPDFsStatus.Visible = true;
|
||||
this.Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
|
||||
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);
|
||||
pbPDFsStatus.TextVisible = true;
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom));
|
||||
frmStatus.CloseWhenDone = true;
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
}
|
||||
}
|
||||
pbPDFsStatus.Visible = false;
|
||||
if(!Automatic)
|
||||
ShowDebugFiles();
|
||||
}
|
||||
|
Reference in New Issue
Block a user