B2020-121: pagination/location of BGE Alarms, Condition Response Caution/Notes
This commit is contained in:
parent
a4395852b6
commit
377788c314
@ -874,11 +874,14 @@ namespace Volian.Print.Library
|
|||||||
private vlnParagraph FirstCRParagraph(vlnParagraph pg)
|
private vlnParagraph FirstCRParagraph(vlnParagraph pg)
|
||||||
{
|
{
|
||||||
if (pg.HasCalvertMacro) return null;
|
if (pg.HasCalvertMacro) return null;
|
||||||
while ( !pg.MyParent.HasCalvertMacro)
|
while (!pg.MyParent.HasCalvertMacro)
|
||||||
pg = pg.MyParent;
|
pg = pg.MyParent;
|
||||||
if(pg.MyItemInfo.MyPrevious == null)
|
if (pg.MyItemInfo.MyPrevious == null)
|
||||||
return pg;
|
return pg;
|
||||||
return pg.MyParent.ChildrenBelow[0];
|
// B2020-121: Account for Header on Caution or Note
|
||||||
|
pg = pg.MyParent.ChildrenBelow[0];
|
||||||
|
pg = pg.TopMostChild;
|
||||||
|
return pg;
|
||||||
}
|
}
|
||||||
private void BuildPageBreakList(float ySpaceOnCurPage, float yPageSize, bool KeepStepsOnPage, float yEndMsg, bool doSectionTitleContinued, bool onNewPage)
|
private void BuildPageBreakList(float ySpaceOnCurPage, float yPageSize, bool KeepStepsOnPage, float yEndMsg, bool doSectionTitleContinued, bool onNewPage)
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,9 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
public partial class vlnMacro : vlnPrintObject
|
public partial class vlnMacro : vlnPrintObject
|
||||||
{
|
{
|
||||||
|
private bool _UseInternalY = false;
|
||||||
|
// B2020-121: Account for Header on Caution or Note
|
||||||
|
public bool UseInternalY { get => _UseInternalY; set => _UseInternalY = value; }
|
||||||
private string _MacroDef;
|
private string _MacroDef;
|
||||||
public string MacroDef
|
public string MacroDef
|
||||||
{
|
{
|
||||||
@ -27,6 +30,7 @@ namespace Volian.Print.Library
|
|||||||
cb.SaveState();
|
cb.SaveState();
|
||||||
MyContentByte = cb;
|
MyContentByte = cb;
|
||||||
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
||||||
|
if (UseInternalY) yLocation = YOffset; // B2020-121: Account for Header on Caution or Note
|
||||||
// Adjust the starting point for the Macro if the LPI is 7
|
// Adjust the starting point for the Macro if the LPI is 7
|
||||||
if (MyPageHelper.YMultiplier != 1) yLocation += SixLinesPerInch - _SevenLinesPerInch;
|
if (MyPageHelper.YMultiplier != 1) yLocation += SixLinesPerInch - _SevenLinesPerInch;
|
||||||
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||||
|
@ -1965,11 +1965,14 @@ namespace Volian.Print.Library
|
|||||||
// 'AlarmYoffStart' value to where the vertical lines of the box start on this page.
|
// 'AlarmYoffStart' value to where the vertical lines of the box start on this page.
|
||||||
if (doAlarmBox && MyItemInfo.StepLevel > 1)
|
if (doAlarmBox && MyItemInfo.StepLevel > 1)
|
||||||
{
|
{
|
||||||
float alrmY = CalculateYOffset(yPageStart, yTopMargin);
|
float alrmY = yTopMargin - (2 * SixLinesPerInch); // CalculateYOffset(yPageStart, yTopMargin);
|
||||||
float macroY = addExtraLines ? YOffset - (6 * SixLinesPerInch) : YOffset - (4 * SixLinesPerInch);
|
vlnMacro vlnm = new vlnMacro((float)docstyle.Layout.LeftMargin - 12, alrmY, "H4");
|
||||||
PartsLeft.Add(new vlnMacro((float)docstyle.Layout.LeftMargin - 12, macroY, "H4"));
|
vlnm.UseInternalY = true; // B2020-121: Account for Header on Caution or Note
|
||||||
|
PartsLeft.Add(vlnm);
|
||||||
MyPageHelper.AlarmYoffStart = alrmY - SixLinesPerInch;
|
MyPageHelper.AlarmYoffStart = alrmY - SixLinesPerInch;
|
||||||
yPageStart -= (4 * SixLinesPerInch);
|
yPageStart -= (4 * SixLinesPerInch);
|
||||||
|
if(ChildrenRight.Count>0 && ChildrenRight[0].ChildrenAbove.Count > 0 && ChildrenRight[0].ChildrenAbove[0].MyItemInfo.IsCautionOrNotePart)
|
||||||
|
yPageStart += (SixLinesPerInch); // B2020-121: Account for Header on Caution or Note
|
||||||
}
|
}
|
||||||
// For Calvert Alarms, if there is no box & this is top of page, if previous step
|
// For Calvert Alarms, if there is no box & this is top of page, if previous step
|
||||||
// had box (macro), adjust up page. The constructor (vlnParagraph), inserted these
|
// had box (macro), adjust up page. The constructor (vlnParagraph), inserted these
|
||||||
@ -6644,22 +6647,22 @@ namespace Volian.Print.Library
|
|||||||
// using a negative for yLocation so that its in descending order:
|
// using a negative for yLocation so that its in descending order:
|
||||||
// B2020-112: Make various adjustments to location if there are format flags used
|
// B2020-112: Make various adjustments to location if there are format flags used
|
||||||
float adjust = para.YVeryTop - para.YTop;
|
float adjust = para.YVeryTop - para.YTop;
|
||||||
if (para.MyItemInfo.MyParent.IsHigh && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0))
|
//if (para.MyItemInfo.MyParent.IsHigh && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0))
|
||||||
{
|
//{
|
||||||
//Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para);
|
// //Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para);
|
||||||
adjust -= para.AdjustForXBlankW1stLevSub;
|
// adjust -= para.AdjustForXBlankW1stLevSub;
|
||||||
}
|
//}
|
||||||
else if (para.MyParent.MyItemInfo.IsHigh && (para.MyParent.ChildrenAbove != null && para.MyParent.ChildrenAbove.Count > 0)
|
//else if (para.MyParent.MyItemInfo.IsHigh && (para.MyParent.ChildrenAbove != null && para.MyParent.ChildrenAbove.Count > 0)
|
||||||
&& para.MyParent.ChildrenAbove[0] == para)
|
// && para.MyParent.ChildrenAbove[0] == para)
|
||||||
{
|
//{
|
||||||
//Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para);
|
// //Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para);
|
||||||
adjust -= para.MyParent.AdjustForXBlankW1stLevSub;
|
// adjust -= para.MyParent.AdjustForXBlankW1stLevSub;
|
||||||
}
|
//}
|
||||||
if (para.AdjustForMatchUpRNO != 0 && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0))
|
//if (para.AdjustForMatchUpRNO != 0 && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0))
|
||||||
adjust -= para.AdjustForMatchUpRNO;
|
// adjust -= para.AdjustForMatchUpRNO;
|
||||||
else if (para.MyParent.AdjustForMatchUpRNO != 0 && (para.MyParent.ChildrenAbove != null && para.MyParent.ChildrenAbove.Count > 0)
|
//else if (para.MyParent.AdjustForMatchUpRNO != 0 && (para.MyParent.ChildrenAbove != null && para.MyParent.ChildrenAbove.Count > 0)
|
||||||
&& para.MyParent.ChildrenAbove[0] == para)
|
// && para.MyParent.ChildrenAbove[0] == para)
|
||||||
adjust -= para.MyParent.AdjustForMatchUpRNO;
|
// adjust -= para.MyParent.AdjustForMatchUpRNO;
|
||||||
|
|
||||||
if (!this[stepLevel].ContainsKey(-(yLocation + adjust)))
|
if (!this[stepLevel].ContainsKey(-(yLocation + adjust)))
|
||||||
this[stepLevel].Add(-(yLocation + adjust), para);
|
this[stepLevel].Add(-(yLocation + adjust), para);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user