C2024-003-print-sub-section

This commit is contained in:
Paul Larsen 2024-02-26 16:06:04 -05:00
parent 6078d30a94
commit 092ed83ca4

View File

@ -2177,7 +2177,7 @@ namespace Volian.Print.Library
}
// get to the correct section for the message, i.e. if on a section, the message should be the parent
// section (not the activesection which is myself); if on a step, the message should be the active section
ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection; //
ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection;
sectContPara = new vlnParagraph(MyParent.MyParent, cb, sectForCont, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter);
if (sectContPara.PartsLeft.Count > 0)
{
@ -2836,13 +2836,13 @@ namespace Volian.Print.Library
{
// Vogtle Alarms: Their alarms are set up differently than standard procedures - the HLS in Vogtle
// alarms is a section in other procedures. The top continue message is shown when a break occurs:
// A continued message will appear on the top of the page ONLY if the pagination occurs anywhere
// A continued message will appear on the top of the page ONLY if the pagination occurs anywhere
// within the first level substep. If, for example, the page break occurs between substep 3 and substep
// 4 as in example 2, no continued message will appear on the top of the page.
// If a continued message is needed, the continued message will include the first level substep number
// if it is a sequential substep, such as “5. (continued)”. If it is NOT a sequential substep, then only
// the word “(continued)” will appear.
// If a page break occurs between high level steps, such as before “Causes:”, then no continued message is needed.
// If a continued message is needed, the continued message will include the first level substep number
// if it is a sequential substep, such as “5. (continued)”. If it is NOT a sequential substep, then only
// the word “(continued)” will appear.
// If a page break occurs between high level steps, such as before “Causes:”, then no continued message is needed.
bool doMessage = true;
if (MyItemInfo.IsHigh) doMessage = false; // at high, don't do message
if (MyItemInfo.MyParent.IsHigh) doMessage = false; // at first level, don't do message
@ -3316,9 +3316,11 @@ namespace Volian.Print.Library
/// This gets the height of the step with it's Caution's, Notes and potentially any First Substeps
/// </summary>
/// <returns></returns>
private float GetFirstPieceSize()
// F2024-006: Vogtle Alarms pagination - added 'includeFirstSub' to get that size of the first substep with the parent step
// to help determine pagination
private float GetFirstPieceSize(bool includeFirstSub = false)
{
vlnParagraph paraLast = GetFirstPieceLastPart();
vlnParagraph paraLast = GetFirstPieceLastPart(includeFirstSub);
float retval = (paraLast.YBottom) - YTopMost;
//Console.WriteLine(MyItemInfo.DBSequence);
return retval;
@ -3372,10 +3374,12 @@ namespace Volian.Print.Library
get { return _YBottomForBox; }
set { _YBottomForBox = value; }
}
private vlnParagraph GetFirstPieceLastPart()
// F2024-006: Vogtle Alarms pagination - added 'includeFirstSub' to get that size of the first substep with the parent step
// to help determine pagination - even when PaginateOnFirstSubstep is turned on
private vlnParagraph GetFirstPieceLastPart(bool includeFirstSub = false)
{
vlnParagraph para = this;
if (!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PaginateOnFirstSubstep && ChildrenBelow != null && ChildrenBelow.Count > 0)
if ((!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PaginateOnFirstSubstep || includeFirstSub) && ChildrenBelow != null && ChildrenBelow.Count > 0)
{
// If the substep has a separator (OR, AND) then return the last substep rather than the first.
string mySep = ChildrenBelow[0].MyItemInfo.FormatStepData.Sep ?? "{Null}";
@ -3388,14 +3392,14 @@ namespace Volian.Print.Library
if (keepEqListTogether && !ChildrenBelow[0].MyItemInfo.IsSequential && !this.MyItemInfo.IsHigh) // Extend to the last Item.
para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart();
else
para = ChildrenBelow[0].GetFirstPieceLastPart();
para = ChildrenBelow[0].GetFirstPieceLastPart(includeFirstSub);
}
}
if (ChildrenRight != null && ChildrenRight.Count > 0)
{
foreach (vlnParagraph paraRight in ChildrenRight)
{
vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart();
vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart(includeFirstSub);
if (paraRightLast.YBottom > para.YBottom)
para = paraRightLast;
}
@ -4490,7 +4494,7 @@ namespace Volian.Print.Library
// Get the minimun value between the AER and RNO YtopMost.
// example. Calvert AOP-7E/XIII/Step A5.h Unit 2 Approved set
//B2021-027 use YOffset if there isn't any children above (AER).
// example: Catawba Unit 1 AP’s; AP/1/A/5500/050; Enclosure 8 step 1
// example: Catawba Unit 1 APs; AP/1/A/5500/050; Enclosure 8 step 1
if (ChildrenAbove.Count == 0)
YTopMost = ChildrenRight[0].ChildrenAbove[0].YOffset; //B2021-027
else
@ -7269,4 +7273,3 @@ namespace Volian.Print.Library
}
}
}