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 // 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 // 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); 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) 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 // 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: // 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 // 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. // 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 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 // if it is a sequential substep, such as “5. (continued)”. If it is NOT a sequential substep, then only
// the word “(continued)” will appear. // 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 page break occurs between high level steps, such as before “Causes:”, then no continued message is needed.
bool doMessage = true; bool doMessage = true;
if (MyItemInfo.IsHigh) doMessage = false; // at high, don't do message if (MyItemInfo.IsHigh) doMessage = false; // at high, don't do message
if (MyItemInfo.MyParent.IsHigh) doMessage = false; // at first level, 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 /// This gets the height of the step with it's Caution's, Notes and potentially any First Substeps
/// </summary> /// </summary>
/// <returns></returns> /// <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; float retval = (paraLast.YBottom) - YTopMost;
//Console.WriteLine(MyItemInfo.DBSequence); //Console.WriteLine(MyItemInfo.DBSequence);
return retval; return retval;
@ -3372,10 +3374,12 @@ namespace Volian.Print.Library
get { return _YBottomForBox; } get { return _YBottomForBox; }
set { _YBottomForBox = value; } 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; 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. // 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}"; 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. if (keepEqListTogether && !ChildrenBelow[0].MyItemInfo.IsSequential && !this.MyItemInfo.IsHigh) // Extend to the last Item.
para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart(); para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart();
else else
para = ChildrenBelow[0].GetFirstPieceLastPart(); para = ChildrenBelow[0].GetFirstPieceLastPart(includeFirstSub);
} }
} }
if (ChildrenRight != null && ChildrenRight.Count > 0) if (ChildrenRight != null && ChildrenRight.Count > 0)
{ {
foreach (vlnParagraph paraRight in ChildrenRight) foreach (vlnParagraph paraRight in ChildrenRight)
{ {
vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart(); vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart(includeFirstSub);
if (paraRightLast.YBottom > para.YBottom) if (paraRightLast.YBottom > para.YBottom)
para = paraRightLast; para = paraRightLast;
} }
@ -4490,7 +4494,7 @@ namespace Volian.Print.Library
// Get the minimun value between the AER and RNO YtopMost. // Get the minimun value between the AER and RNO YtopMost.
// example. Calvert AOP-7E/XIII/Step A5.h Unit 2 Approved set // example. Calvert AOP-7E/XIII/Step A5.h Unit 2 Approved set
//B2021-027 use YOffset if there isn't any children above (AER). //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) if (ChildrenAbove.Count == 0)
YTopMost = ChildrenRight[0].ChildrenAbove[0].YOffset; //B2021-027 YTopMost = ChildrenRight[0].ChildrenAbove[0].YOffset; //B2021-027
else else
@ -5643,7 +5647,7 @@ namespace Volian.Print.Library
} }
// if this is a caution or note, put the change bar to the right of the text: // if this is a caution or note, put the change bar to the right of the text:
//if ((paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote) && fixedChgCol < -10) return -fixedChgCol; //if ((paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote) && fixedChgCol < -10) return -fixedChgCol;
if ((fixedChgCol == 0)) // && paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote) if ((fixedChgCol == 0))// && paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
//if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote) //if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
{ {
float rightEdge = (paragraph.XOffset + paragraph.Width + 5); float rightEdge = (paragraph.XOffset + paragraph.Width + 5);
@ -7269,4 +7273,3 @@ namespace Volian.Print.Library
} }
} }
} }