F2021-038: Lessen line spacing around Notes/Cautions; widen Caution box to make it consistent with Note

F2021-038: SHE/SHEA Lessen line spacing around Notes/Cautions; widen Caution box to make it consistent with Note
This commit is contained in:
Kathy Ruffing 2022-08-24 16:10:05 +00:00
parent a8b8f9f9c7
commit 738a726e6b
5 changed files with 39 additions and 7 deletions

Binary file not shown.

Binary file not shown.

View File

@ -5067,6 +5067,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _ReadOnly, "@ReadOnly"); return LazyLoad(ref _ReadOnly, "@ReadOnly");
} }
} }
private LazyLoad<bool> _NoYBxAdjust; // F2021-038: SHE/SHEA less space after top line & before bottom line
public bool NoYBxAdjust
{
get
{
return LazyLoad(ref _NoYBxAdjust, "@NoYBxAdjust");
}
}
//private LazyLoad<bool> _SeparateWarning; // KBR: To be used for Proms Express to separate out warnings from notes/cautions on ribbon, etc //private LazyLoad<bool> _SeparateWarning; // KBR: To be used for Proms Express to separate out warnings from notes/cautions on ribbon, etc
//public bool SeparateWarning //public bool SeparateWarning
//{ //{

View File

@ -217,7 +217,10 @@ namespace Volian.Print.Library
lineThickness = 3; lineThickness = 3;
cb.SetLineWidth(lineThickness); cb.SetLineWidth(lineThickness);
// use a Y adjustment (top & bottom) to make the caution box match the 16bit output. // use a Y adjustment (top & bottom) to make the caution box match the 16bit output.
float YbxAdjust = 6.5F;
// F2021-038: SHE/SHEA format - Less space between text and bottom line of Caution Box
float YbxAdjust = (MyParent.MyItemInfo.IsStep && MyParent.MyItemInfo.FormatStepData.NoYBxAdjust) ? 0 : 6.5F;
// C2018-004 create meta file for baseline compares // C2018-004 create meta file for baseline compares
Volian.Base.Library.BaselineMetaFile.WriteLine("BXFPLCn Lf={0} Bt={1} W={2} H={3}", left + llxOffset, bottom - YbxAdjust + (lineThickness / 2), right - left, (Height - lineThickness + 2 * YbxAdjust) * MyPageHelper.YMultiplier); Volian.Base.Library.BaselineMetaFile.WriteLine("BXFPLCn Lf={0} Bt={1} W={2} H={3}", left + llxOffset, bottom - YbxAdjust + (lineThickness / 2), right - left, (Height - lineThickness + 2 * YbxAdjust) * MyPageHelper.YMultiplier);
cb.Rectangle(left + llxOffset, bottom - YbxAdjust + (lineThickness / 2), right - left, (Height - lineThickness + 2*YbxAdjust) * MyPageHelper.YMultiplier); cb.Rectangle(left + llxOffset, bottom - YbxAdjust + (lineThickness / 2), right - left, (Height - lineThickness + 2*YbxAdjust) * MyPageHelper.YMultiplier);

View File

@ -231,6 +231,7 @@ namespace Volian.Print.Library
if (bxIndx != null && (handleSeparateBox || bxIndex != bxIndx || doSeparateBoxHdrChg)) if (bxIndx != null && (handleSeparateBox || bxIndex != bxIndx || doSeparateBoxHdrChg))
{ {
bool didSeparateBoxChgYAdjust = false;
if (box != null) if (box != null)
{ {
box.Height = yoff - box.YOffset; // new height, with children box.Height = yoff - box.YOffset; // new height, with children
@ -250,11 +251,16 @@ namespace Volian.Print.Library
// to add an extra line after note box. // to add an extra line after note box.
else if (formatInfo.Name.ToUpper().StartsWith("FNP") && childItemInfo.MyPrevious != null && childItemInfo.MyPrevious.IsNote && childItemInfo.IsCaution) else if (formatInfo.Name.ToUpper().StartsWith("FNP") && childItemInfo.MyPrevious != null && childItemInfo.MyPrevious.IsNote && childItemInfo.IsCaution)
yoff += vlnPrintObject.SixLinesPerInch * 2; yoff += vlnPrintObject.SixLinesPerInch * 2;
else if (doSeparateBoxHdrChg) else if (doSeparateBoxHdrChg) // F2021-038: SHE/SHEA format - Less space after boxes (removes it below)
{
didSeparateBoxChgYAdjust = true;
yoff += vlnPrintObject.SixLinesPerInch * 2; yoff += vlnPrintObject.SixLinesPerInch * 2;
}
} }
box = new vlnBox(); box = new vlnBox();
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx]; box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
// F2021-038: SHE/SHEA format - Less space after boxes
if (didSeparateBoxChgYAdjust && childItemInfo.IsStep && childItemInfo.FormatStepData.NoYBxAdjust) yoff -= vlnPrintObject.SixLinesPerInch;
int ln = 1; // a format flag determines whether there is a space before the note/caution. int ln = 1; // a format flag determines whether there is a space before the note/caution.
//if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++; //if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
if (childItemInfo.MixCautionNotesDiffType()) ln += 2; if (childItemInfo.MixCautionNotesDiffType()) ln += 2;
@ -552,7 +558,9 @@ namespace Volian.Print.Library
if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin)) if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
{ {
yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0); yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0);
if ((MyItemInfo.Cautions != null && MyItemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (MyItemInfo.Notes != null && MyItemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines)) // F2021-038: SHE/SHEA format - Less space after boxes: the AlwaysUseExtyraLines was removed in SHE/SHEA format, but the
// following adjustment to the y location of HLS when AT TOP of page is still needed, i.e. added the NoYBxAdjust check which is SHE/SHEA specific
if ((MyItemInfo.Cautions != null && (MyItemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines || MyItemInfo.Cautions[0].FormatStepData.NoYBxAdjust)) || (MyItemInfo.Notes != null && (MyItemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines || MyItemInfo.Notes[0].FormatStepData.NoYBxAdjust)))
yPageStart -= ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0); yPageStart -= ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0);
} }
// Save the HLS & RNO string in case the pagelist item uses it (some of the backgrounds): // Save the HLS & RNO string in case the pagelist item uses it (some of the backgrounds):
@ -3927,14 +3935,27 @@ namespace Volian.Print.Library
if (YOffset != 0 && MyItemInfo.FormatStepData != null && if (YOffset != 0 && MyItemInfo.FormatStepData != null &&
MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove && (!MyItemInfo.IsNote || MyItemInfo.MyParent.Cautions == null)) MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove && (!MyItemInfo.IsNote || MyItemInfo.MyParent.Cautions == null))
addExtraSpace = 24; // already has one blank line above, added two more addExtraSpace = 24; // already has one blank line above, added two more
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0) //if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
// addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace; // addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace;
// if this plant has the AlwaysUseExtraLines and there are notes/cautions above the hls, don't add in the // if this plant has the AlwaysUseExtraLines and there are notes/cautions above the hls, don't add in the
// extra space: // extra space:
if (itemInfo.IsHigh && (itemInfo.Cautions != null || itemInfo.Notes != null)) if (itemInfo.IsHigh && (itemInfo.Cautions != null || itemInfo.Notes != null))
{ {
if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines)) if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines))
addExtraSpace = 0; addExtraSpace = 0;
// F2021-038: SHE/SHEA format - Less space after boxes
if (itemInfo.Cautions != null && itemInfo.Cautions[itemInfo.Cautions.Count - 1].FormatStepData.NoYBxAdjust)
addExtraSpace = 0;
if (itemInfo.Notes != null && itemInfo.Notes[itemInfo.Notes.Count - 1].FormatStepData.NoYBxAdjust)
addExtraSpace = 0;
}
// F2021-038: SHE/SHEA format - Less space after boxes. The following is for when a HLS has an RNO that has Cautions/Notes
if (itemInfo.IsHigh && itemInfo.RNOs != null)
{
if (itemInfo.RNOs[0].Notes != null && itemInfo.RNOs[0].Notes[0].FormatStepData.NoYBxAdjust)
addExtraSpace = 0;
if (itemInfo.RNOs[0].Cautions != null && itemInfo.RNOs[0].Cautions[0].FormatStepData.NoYBxAdjust)
addExtraSpace = 0;
} }
if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null) if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null)
{ {