B2021-102 Baseline print testing Out of Memory fix printing Parent/Child sets
B2021-102 Moved calls that populate metafile testing file from DlgPrintProcedure CreatePDF and CreatePDFs
This commit is contained in:
parent
99db97598d
commit
80fff4878b
@ -725,23 +725,29 @@ namespace VEPROMS
|
|||||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||||
pbPDFsStatus.Value = i;
|
pbPDFsStatus.Value = i;
|
||||||
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
|
||||||
|
// B2021-102 we now get this information in frmPDFStatusForm()
|
||||||
|
//MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||||
if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
//if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||||
|
|
||||||
string myPDFPath = GetMultiunitPDFPath();
|
string myPDFPath = GetMultiunitPDFPath();
|
||||||
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
|
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
|
||||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
// B2021-102 put in the using for better memory management
|
||||||
|
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd);//C2018-009 print PROMS version
|
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd))//;//C2018-009 print PROMS version
|
||||||
frmStatus.CloseWhenDone = true;
|
{
|
||||||
Application.DoEvents();
|
frmStatus.CloseWhenDone = true;
|
||||||
frmStatus.CancelStop = true;
|
Application.DoEvents();
|
||||||
frmStatus.ShowDialog();
|
frmStatus.CancelStop = true;
|
||||||
locpdfname = frmStatus.PdfFile;
|
frmStatus.ShowDialog();
|
||||||
if (frmStatus.CancelPrinting) break;
|
locpdfname = frmStatus.PdfFile;
|
||||||
AddToMergeList(myProc, locpdfname);
|
if (frmStatus.CancelPrinting) break;
|
||||||
|
AddToMergeList(myProc, locpdfname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// This is a master/slave for printing of all slaves (SelectedSave == 0)
|
// This is a master/slave for printing of all slaves (SelectedSave == 0)
|
||||||
@ -755,22 +761,28 @@ namespace VEPROMS
|
|||||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||||
pbPDFsStatus.Value = i;
|
pbPDFsStatus.Value = i;
|
||||||
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
|
||||||
|
// B2021-102 we now get this information in frmPDFStatusForm()
|
||||||
|
//MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||||
if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
//if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||||
|
|
||||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
// B2021-102 put in the using for better memory management
|
||||||
|
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd);//C2018-009 print PROMS version
|
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd)) // ;//C2018-009 print PROMS version
|
||||||
frmStatus.CloseWhenDone = true;
|
{
|
||||||
Application.DoEvents();
|
frmStatus.CloseWhenDone = true;
|
||||||
frmStatus.CancelStop = true;
|
Application.DoEvents();
|
||||||
frmStatus.ShowDialog();
|
frmStatus.CancelStop = true;
|
||||||
locpdfname = frmStatus.PdfFile;
|
frmStatus.ShowDialog();
|
||||||
if (frmStatus.CancelPrinting) break;
|
locpdfname = frmStatus.PdfFile;
|
||||||
AddToMergeList(myProc, locpdfname);
|
if (frmStatus.CancelPrinting) break;
|
||||||
|
AddToMergeList(myProc, locpdfname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Not master/slave
|
// Not master/slave
|
||||||
@ -783,25 +795,30 @@ namespace VEPROMS
|
|||||||
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||||
int profileDepth1 = ProfileTimer.Push(">>>> GetItemAndChildren");
|
int profileDepth1 = ProfileTimer.Push(">>>> GetItemAndChildren");
|
||||||
if (MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
|
// B2021-102 we now get this information in frmPDFStatusForm()
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
//if (MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
|
||||||
else
|
// MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
|
//else
|
||||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
// MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
|
||||||
if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
//// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
//if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||||
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||||
|
|
||||||
ProfileTimer.Pop(profileDepth1);
|
ProfileTimer.Pop(profileDepth1);
|
||||||
|
// B2021-102 put in the using for better memory management
|
||||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked,
|
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked,
|
||||||
cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text,
|
cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text,
|
||||||
new Point(Left, Bottom - 50), swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd);//C2018-009 print PROMS version
|
new Point(Left, Bottom - 50), swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd)) // ;//C2018-009 print PROMS version
|
||||||
frmStatus.CloseWhenDone = true;
|
{
|
||||||
Application.DoEvents();
|
frmStatus.CloseWhenDone = true;
|
||||||
frmStatus.CancelStop = true;
|
Application.DoEvents();
|
||||||
frmStatus.ShowDialog();
|
frmStatus.CancelStop = true;
|
||||||
locpdfname = frmStatus.PdfFile;
|
frmStatus.ShowDialog();
|
||||||
if (frmStatus.CancelPrinting) break;
|
locpdfname = frmStatus.PdfFile;
|
||||||
AddToMergeList(myProc, locpdfname);
|
if (frmStatus.CancelPrinting) break;
|
||||||
|
AddToMergeList(myProc, locpdfname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -903,28 +920,32 @@ namespace VEPROMS
|
|||||||
// Also check that format allows override.
|
// Also check that format allows override.
|
||||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||||
int profileDepth2 = ProfileTimer.Push(">>>> CreatePdf.GetItemAndChildren");
|
int profileDepth2 = ProfileTimer.Push(">>>> CreatePdf.GetItemAndChildren");
|
||||||
|
|
||||||
// B2021-088 moved this if/else to frmPDFStatusForm() so that the Approval logic will have access to this logic
|
// B2021-088 moved this if/else to frmPDFStatusForm() so that the Approval logic will have access to this logic
|
||||||
//if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
|
//if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
|
||||||
// MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
// MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||||
//else
|
//else
|
||||||
// MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
|
// MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
|
||||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a"," | "));
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a"," | "));
|
||||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||||
|
|
||||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||||
ProfileTimer.Pop(profileDepth2);
|
ProfileTimer.Pop(profileDepth2);
|
||||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||||
// B2018-124 use text of watermark form drop down list instead of enum value
|
// B2018-124 use text of watermark form drop down list instead of enum value
|
||||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, false, tbBlankPage.Text, _MergedPfd); //C2018-009 print PROMS version
|
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, false, tbBlankPage.Text, _MergedPfd))//; //C2018-009 print PROMS version
|
||||||
frmStatus.MakePlaceKeeper = swtbtnGeneratePlacekeeper.Value;
|
{
|
||||||
frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked;
|
frmStatus.MakePlaceKeeper = swtbtnGeneratePlacekeeper.Value;
|
||||||
if (Automatic && cbxGenerateConActSum.Checked)
|
frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked;
|
||||||
frmStatus.OnlyShowContinuousActionSummary = true;
|
if (Automatic && cbxGenerateConActSum.Checked)
|
||||||
int profileDepth3 = ProfileTimer.Push(">>>> frmStatus");
|
frmStatus.OnlyShowContinuousActionSummary = true;
|
||||||
frmStatus.ShowDialog();
|
int profileDepth3 = ProfileTimer.Push(">>>> frmStatus");
|
||||||
ProfileTimer.Pop(profileDepth3);
|
frmStatus.ShowDialog();
|
||||||
|
ProfileTimer.Pop(profileDepth3);
|
||||||
|
}
|
||||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
this.Close();
|
this.Close();
|
||||||
ShowDebugFiles();
|
ShowDebugFiles();
|
||||||
|
@ -90,6 +90,10 @@ namespace VEPROMS
|
|||||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||||
else
|
else
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
|
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
|
||||||
|
// B2021-102 moved the baseline meta file write here too - should have been done with B2021-088 fix
|
||||||
|
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||||
|
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||||
|
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||||
myItem = MyProcedure;
|
myItem = MyProcedure;
|
||||||
|
|
||||||
Prefix = prefix;
|
Prefix = prefix;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user