Bring branch up to date
This commit is contained in:
@@ -65,83 +65,114 @@ namespace Volian.Print.Library
|
||||
//xoff += (float)childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColT;
|
||||
xoff = xoffBase + (float)childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColT;
|
||||
|
||||
// if in a ComponentTableFormat (FNP sub format 1, component list), column headers are defined
|
||||
// by the first level of children. The data for the column is the child of the column header.
|
||||
// Sometimes the column will not have data, the following handles that case. Also, use
|
||||
// the boolean didComponentTableRow to keep track of the bottom most yoff of the table row.
|
||||
if ((childItemInfo.MyDocStyle.ComponentList) && childItemInfo.MyParent.IsInTemplate() ||
|
||||
(childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && childItemInfo.IsInTemplate()))
|
||||
{
|
||||
if (childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
{
|
||||
// if this template element has a -1 for row, print it (if = 0 this is a heading for edit
|
||||
// and not printed). if this template element has a width of > 0, then also print it,
|
||||
// these are headings and should be printed). This was added for Calvert Alarm (BGEALN) format for
|
||||
// DEVICE/SETPOINT (row=-1), and for POSSIBLE CAUSES, AUTOMATIC ACTIONS, etc (width>0)
|
||||
// find the indexes into the template for this item. The index must be for the HLS this is
|
||||
// or this is under.
|
||||
int tindx = childItemInfo.TemplateIndex;
|
||||
if (tindx == -1)
|
||||
xoff = (float)childItemInfo.MyDocStyle.Layout.LeftMargin;
|
||||
else if (childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row < 0 ||
|
||||
childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].width > 0)
|
||||
{
|
||||
// move down for the 'POSSIBLE CAUSES'. To know it's that step type, check
|
||||
// the column field in template. -1 represents staying on same row but using
|
||||
// the start template field to get the xoffset.
|
||||
if (prevTplRow == -1 && prevTplRow != childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row)
|
||||
{
|
||||
// position to the furthest down the page of the Device/setpoint/annunciator window:
|
||||
yoff = Math.Max(yoff, Parent.YBottomMost + vlnPrintObject.SixLinesPerInch);
|
||||
yoff = Math.Max(yoff, tableBottomMost + vlnPrintObject.SixLinesPerInch);
|
||||
}
|
||||
xoff = (float)childItemInfo.MyDocStyle.Layout.LeftMargin + (childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].start * 7.2f);
|
||||
prevTplRow = childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// childItemInfo = 'child' and set to use a template for defining size.
|
||||
// Note that the 'IsCaution1' was added for Calvert Valve lists, i.e.
|
||||
// the Caution1 is a subheader & must be printed within the valve list table.
|
||||
if (childItemInfo.Steps == null && !childItemInfo.IsCaution1)
|
||||
continue;
|
||||
if (!childItemInfo.IsCaution1) childItemInfo = childItemInfo.Steps[0];
|
||||
didComponentTableRow = true;
|
||||
}
|
||||
}
|
||||
if (childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.TabData != null && childItemInfo.FormatStepData.TabData.IsTransition)
|
||||
{
|
||||
lastHeader = childItemInfo.DisplayText;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((childItemInfo.IsCaution || childItemInfo.IsNote) &&
|
||||
childItemInfo.MyPrevious != null && childItemInfo.MyPrevious.MyContent.Type != childItemInfo.MyContent.Type &&
|
||||
childItemInfo.NextItem != null && childItemInfo.MyContent.Type == childItemInfo.NextItem.MyContent.Type)
|
||||
childItemInfo.SetupTags(); // added for V.C. Summer Transition caution in EOP-15.0 step 5.4
|
||||
if (lastHeader != null)
|
||||
{
|
||||
childItemInfo.SetHeader(childItemInfo.FormatStepData.TabData.Font, lastHeader);
|
||||
lastHeader = null;
|
||||
}
|
||||
// if the format has MatchUpRNOCautNote, then add a line to yoff, if not at top of rno column.
|
||||
if (childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.MatchUpRNO)
|
||||
{
|
||||
if (childItemInfo.MyParent != null && childItemInfo.MyParent.MyParent != null && !childItemInfo.MyParent.MyParent.IsHigh)
|
||||
{
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
Parent.AdjustForMatchUpRNO = vlnPrintObject.SixLinesPerInch; // B2020-112
|
||||
}
|
||||
}
|
||||
// if this is a caution/note and it has a caution/note substep, do it before this caution/note, so that
|
||||
// it comes above it.
|
||||
if (childItemInfo.Cautions != null && (childItemInfo.IsCaution || childItemInfo.IsNote))
|
||||
yoff = Add(cb, childItemInfo.Cautions, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo);
|
||||
if (childItemInfo.Notes != null && (childItemInfo.IsCaution || childItemInfo.IsNote))
|
||||
yoff = Add(cb, childItemInfo.Notes, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo);
|
||||
//int? bxIndx = childItemInfo.FormatStepData == null ? -1 : childItemInfo.FormatStepData.StepLayoutData.STBoxindex;
|
||||
bool boxHLS = false;
|
||||
// if in a ComponentTableFormat (FNP sub format 1, component list), column headers are defined
|
||||
// by the first level of children. The data for the column is the child of the column header.
|
||||
// Sometimes the column will not have data, the following handles that case. Also, use
|
||||
// the boolean didComponentTableRow to keep track of the bottom most yoff of the table row.
|
||||
if ((childItemInfo.MyDocStyle.ComponentList) && childItemInfo.MyParent.IsInTemplate() ||
|
||||
(childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && childItemInfo.IsInTemplate()))
|
||||
{
|
||||
if (childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
{
|
||||
// if this template element has a -1 for row, print it (if = 0 this is a heading for edit
|
||||
// and not printed). if this template element has a width of > 0, then also print it,
|
||||
// these are headings and should be printed). This was added for Calvert Alarm (BGEALN) format for
|
||||
// DEVICE/SETPOINT (row=-1), and for POSSIBLE CAUSES, AUTOMATIC ACTIONS, etc (width>0)
|
||||
// find the indexes into the template for this item. The index must be for the HLS this is
|
||||
// or this is under.
|
||||
int tindx = childItemInfo.TemplateIndex;
|
||||
if (tindx == -1)
|
||||
xoff = (float)childItemInfo.MyDocStyle.Layout.LeftMargin;
|
||||
else if (childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row < 0 ||
|
||||
childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].width > 0)
|
||||
{
|
||||
// move down for the 'POSSIBLE CAUSES'. To know it's that step type, check
|
||||
// the column field in template. -1 represents staying on same row but using
|
||||
// the start template field to get the xoffset.
|
||||
if (prevTplRow == -1 && prevTplRow != childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row)
|
||||
{
|
||||
// position to the furthest down the page of the Device/setpoint/annunciator window:
|
||||
yoff = Math.Max(yoff, Parent.YBottomMost + vlnPrintObject.SixLinesPerInch);
|
||||
yoff = Math.Max(yoff, tableBottomMost + vlnPrintObject.SixLinesPerInch);
|
||||
}
|
||||
xoff = (float)childItemInfo.MyDocStyle.Layout.LeftMargin + (childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].start * 7.2f);
|
||||
prevTplRow = childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// childItemInfo = 'child' and set to use a template for defining size.
|
||||
// Note that the 'IsCaution1' was added for Calvert Valve lists, i.e.
|
||||
// the Caution1 is a subheader & must be printed within the valve list table.
|
||||
if (childItemInfo.Steps == null && !childItemInfo.IsCaution1)
|
||||
continue;
|
||||
if (!childItemInfo.IsCaution1) childItemInfo = childItemInfo.Steps[0];
|
||||
didComponentTableRow = true;
|
||||
}
|
||||
}
|
||||
if (childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.TabData != null && childItemInfo.FormatStepData.TabData.IsTransition)
|
||||
{
|
||||
lastHeader = childItemInfo.DisplayText;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((childItemInfo.IsCaution || childItemInfo.IsNote) &&
|
||||
childItemInfo.MyPrevious != null && childItemInfo.MyPrevious.MyContent.Type != childItemInfo.MyContent.Type &&
|
||||
childItemInfo.NextItem != null && childItemInfo.MyContent.Type == childItemInfo.NextItem.MyContent.Type)
|
||||
childItemInfo.SetupTags(); // added for V.C. Summer Transition caution in EOP-15.0 step 5.4
|
||||
if (lastHeader != null)
|
||||
{
|
||||
childItemInfo.SetHeader(childItemInfo.FormatStepData.TabData.Font, lastHeader);
|
||||
lastHeader = null;
|
||||
}
|
||||
// B2026-072 Caution/Note off of an RNO sub-step was printing on top of the parent AER sub-step text
|
||||
// ex: Farley Unit 1 AOPs 1-AOP-1.0, Procedure Steps section, step 8.4.1
|
||||
// if printing a Caution or Note type that is in the RNO column and we are a printing a two column section
|
||||
if ((childItemInfo.IsCaution || childItemInfo.IsNote) && childItemInfo.IsInRNO && childItemInfo.ColumnMode>0)
|
||||
{
|
||||
// get the starting positon of the RNO column
|
||||
float colR = float.Parse(formatInfo.MyStepSectionLayoutData.ColRTable.Split(",".ToCharArray())[childItemInfo.ColumnMode]);
|
||||
// get the starting position of the Caution or Note
|
||||
float startColOfCautionNote = xoff;
|
||||
if (bxIndx != null)
|
||||
{
|
||||
// if it is a boxed Caution or Note, then get the starting colun of the box
|
||||
Box bx = childItemInfo.ActiveFormat.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
||||
startColOfCautionNote = bx.Start??0;
|
||||
}
|
||||
// If the starting positon of Caution/Note is in the AER column, find the y position of the last text line of
|
||||
// the AER parent to the RNO step.
|
||||
if (startColOfCautionNote < colR)
|
||||
{
|
||||
vlnParagraph tparent = Parent;
|
||||
while (tparent.MyItemInfo.IsInRNO) tparent = tparent.MyParent; // find the parent AER sub-step
|
||||
if (tparent != Parent && tparent.MyItemInfo.IsInSubStep)
|
||||
{
|
||||
// add the height of the AER sub-step text to its starting yoffset
|
||||
float tyoff = tparent.YOffset + tparent.Height;
|
||||
// while the position in the AER column (tyoff) is greater then or equal to starting position
|
||||
// of the Note or Caution, move down the page a line at time.
|
||||
// SixLinesPerInch adjusts for when we are printing in compress mode.
|
||||
while (tyoff >= yoff) yoff += vlnPrintObject.SixLinesPerInch;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if the format has MatchUpRNOCautNote, then add a line to yoff, if not at top of rno column.
|
||||
if (childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.MatchUpRNO)
|
||||
{
|
||||
if (childItemInfo.MyParent != null && childItemInfo.MyParent.MyParent != null && !childItemInfo.MyParent.MyParent.IsHigh)
|
||||
{
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
}
|
||||
}
|
||||
// if this is a caution/note and it has a caution/note substep, do it before this caution/note, so that
|
||||
// it comes above it.
|
||||
if (childItemInfo.Cautions != null && (childItemInfo.IsCaution || childItemInfo.IsNote))
|
||||
yoff = Add(cb, childItemInfo.Cautions, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo);
|
||||
if (childItemInfo.Notes != null && (childItemInfo.IsCaution || childItemInfo.IsNote))
|
||||
yoff = Add(cb, childItemInfo.Notes, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo);
|
||||
//int? bxIndx = childItemInfo.FormatStepData == null ? -1 : childItemInfo.FormatStepData.StepLayoutData.STBoxindex;
|
||||
bool boxHLS = false;
|
||||
|
||||
// If this step has a previous, and its header is different than the previous's header. Allow it to go
|
||||
// into the box code. Without this check, none of the box code is run. This caused a problem
|
||||
@@ -1460,7 +1491,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private static bool DoSubs = true; // flag whether to print substeps (don't if doing continued checklist header)
|
||||
public float AdjustForXBlankW1stLevSub = 0; // B2020-112 this & next line
|
||||
public float AdjustForMatchUpRNO = 0;
|
||||
protected float _ContinueHeight = 0;
|
||||
public virtual float ContinueHeight
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user