F2024-078 - Adjust the spacing before and after the Note tab, along with the blank space (line) at the bottom of the Note box per the example supplied by the customer. Also made similar adjustments to the Caution tab and box. #465
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6213,6 +6213,36 @@ public StepData Equation // equation has a parent of embedded object.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// F2024-078 adjusts the the spacing before the Note/Caution tab - the space betwee the top of the box and the tab text
|
||||||
|
private LazyLoad<float?> _AdjSpB4Tab;
|
||||||
|
public float? AdjSpB4Tab
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _AdjSpB4Tab, "@AdjSpB4Tab");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// F2024-078 adjusts the the spacing after the Note/Caution tab - the space betwee the tab text and the first line of of Note/Caution text
|
||||||
|
private LazyLoad<float?> _AdjSpAftTab;
|
||||||
|
public float? AdjSpAftTab
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _AdjSpAftTab, "@AdjSpAftTab");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// F2024-078 adjusts the the spacing after the last line of Note/Caution text - between the last line of text and the bottom of the box
|
||||||
|
private LazyLoad<float?> _AdjLastBlnkLn;
|
||||||
|
public float? AdjLastBlnkLn
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _AdjLastBlnkLn, "@AdjLastBlnkLn");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box
|
// this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box
|
||||||
private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings
|
private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings
|
||||||
public bool ThickDouble
|
public bool ThickDouble
|
||||||
|
@ -226,6 +226,8 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
yoff += vlnPrintObject.SixLinesPerInch;
|
yoff += vlnPrintObject.SixLinesPerInch;
|
||||||
}
|
}
|
||||||
|
if (box.MyBox != null)
|
||||||
|
yoff += (float)(box.MyBox.AdjSpB4Tab ?? 0); // F2024-078 adjust space above the Note/Caution box tab
|
||||||
}
|
}
|
||||||
bxIndex = bxIndx;
|
bxIndex = bxIndx;
|
||||||
}
|
}
|
||||||
@ -273,6 +275,8 @@ namespace Volian.Print.Library
|
|||||||
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
|
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
|
||||||
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
||||||
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
||||||
|
if (box.MyBox != null)
|
||||||
|
yoff += (float)(box.MyBox.AdjSpB4Tab ?? 0); // F2024-078 adjust space above the Note/Caution box tab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bxIndex = bxIndx;
|
bxIndex = bxIndx;
|
||||||
@ -5497,7 +5501,23 @@ namespace Volian.Print.Library
|
|||||||
// code looks up parents to see if they have next before returning a 0 (no blank line)
|
// code looks up parents to see if they have next before returning a 0 (no blank line)
|
||||||
// B2022-042: double Caution followed by Critical Step missing bullet
|
// B2022-042: double Caution followed by Critical Step missing bullet
|
||||||
// F2022-010: substeps in multiple notes, cautions, warning print differently
|
// F2022-010: substeps in multiple notes, cautions, warning print differently
|
||||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsInCautionOrNote))
|
if (MyItemInfo.IsInCautionOrNote)
|
||||||
|
{
|
||||||
|
float adjLastBlankLineInNoteCautionWarning = 0;
|
||||||
|
// Get the box information for the Note, Caution, or Warning
|
||||||
|
ItemInfo tifo = (MyItemInfo.IsCaution || MyItemInfo.IsNote) ? MyItemInfo : MyItemInfo.ParentNoteOrCaution;
|
||||||
|
int typ = ((int)tifo.MyContent.Type) % 10000;
|
||||||
|
int? bxIndx = tifo.ActiveFormat.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
|
||||||
|
if (bxIndx != null)
|
||||||
|
{
|
||||||
|
Box bx = tifo.ActiveFormat.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
||||||
|
// F2024-078 save the adjustment of the last blank line - this value will be added to the SixLinesPerInch value (a blank line)
|
||||||
|
adjLastBlankLineInNoteCautionWarning = (float)(bx.AdjLastBlnkLn ?? 0);
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
// if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsInCautionOrNote))
|
||||||
|
// F2024-078 added check for adjustment of the last blank line in the Note/Caution box
|
||||||
|
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn || adjLastBlankLineInNoteCautionWarning != 0)
|
||||||
{
|
{
|
||||||
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.NextItem == null)) // there are no sub-steps, see if any parents have next
|
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.NextItem == null)) // there are no sub-steps, see if any parents have next
|
||||||
{
|
{
|
||||||
@ -5510,9 +5530,22 @@ namespace Volian.Print.Library
|
|||||||
if ((par.NextItem == null) || (par.MyContent.Type != par.NextItem.MyContent.Type)) par = par.MyParent;
|
if ((par.NextItem == null) || (par.MyContent.Type != par.NextItem.MyContent.Type)) par = par.MyParent;
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
if (!par.IsInCautionOrNote || (par != null && par.MyContent.Type != par.NextItem.MyContent.Type)) return 0;
|
if (!par.IsInCautionOrNote || (par != null && par.MyContent.Type != par.NextItem.MyContent.Type))
|
||||||
|
{
|
||||||
|
if (adjLastBlankLineInNoteCautionWarning != 0)
|
||||||
|
return SixLinesPerInch + adjLastBlankLineInNoteCautionWarning; // F2024-078 adjust the size of the last blank line of Note/Caution box
|
||||||
|
else
|
||||||
|
return 0; // no blank line after last text line of Note/Caution/Warning
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && MyItemInfo.NextItem != null && MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)
|
||||||
|
{
|
||||||
|
if (adjLastBlankLineInNoteCautionWarning != 0)
|
||||||
|
return SixLinesPerInch + adjLastBlankLineInNoteCautionWarning;
|
||||||
|
else
|
||||||
|
return 0; // no blank line after last text line of Note/Caution/Warning
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && MyItemInfo.NextItem != null && MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type) return 0;
|
|
||||||
}
|
}
|
||||||
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
||||||
// B2022-003: BNPP Alarms (BNPPalr) - incorrect line spacing for substeps off substeps. Added a format flag so as not to affect other plants.
|
// B2022-003: BNPP Alarms (BNPPalr) - incorrect line spacing for substeps off substeps. Added a format flag so as not to affect other plants.
|
||||||
@ -5797,6 +5830,7 @@ namespace Volian.Print.Library
|
|||||||
float hdrWidth = (itemInfo.MyHeader.CleanText == null) ? 0 : itemInfo.MyHeader.CleanText.Length * 6;
|
float hdrWidth = (itemInfo.MyHeader.CleanText == null) ? 0 : itemInfo.MyHeader.CleanText.Length * 6;
|
||||||
int typ = ((int)itemInfo.MyContent.Type) % 10000;
|
int typ = ((int)itemInfo.MyContent.Type) % 10000;
|
||||||
int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
|
int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
|
||||||
|
float adjmentAfterBoxedNoteCautionTab = 0; // F2024-078 used to save the adjustment of the space after the Note/Caution tab
|
||||||
|
|
||||||
if (itemInfo.MyHeader.Justify == System.Drawing.ContentAlignment.MiddleCenter)
|
if (itemInfo.MyHeader.Justify == System.Drawing.ContentAlignment.MiddleCenter)
|
||||||
{
|
{
|
||||||
@ -5807,6 +5841,7 @@ namespace Volian.Print.Library
|
|||||||
xoff += (float)bx.TabPos; // xoff starts as left margin
|
xoff += (float)bx.TabPos; // xoff starts as left margin
|
||||||
else
|
else
|
||||||
xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin
|
xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin
|
||||||
|
adjmentAfterBoxedNoteCautionTab = (float) (bx.AdjSpAftTab ?? 0); // F2024-078 save the adjustment of the space (line) after the Note/Caution tab
|
||||||
}
|
}
|
||||||
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && itemInfo.IsInRNO && (itemInfo.IsCaution || itemInfo.IsNote)) // C2014-009
|
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && itemInfo.IsInRNO && (itemInfo.IsCaution || itemInfo.IsNote)) // C2014-009
|
||||||
xoff = XOffset + (para.Width / 2) - (hdrWidth / 2);
|
xoff = XOffset + (para.Width / 2) - (hdrWidth / 2);
|
||||||
@ -5841,7 +5876,7 @@ namespace Volian.Print.Library
|
|||||||
// F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but
|
// F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but
|
||||||
// not compress the page - this need to handle explicit OR and AND sub-steps to ensure there are blank lines before and after
|
// not compress the page - this need to handle explicit OR and AND sub-steps to ensure there are blank lines before and after
|
||||||
// the separator text.
|
// the separator text.
|
||||||
return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0);
|
return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0) + adjmentAfterBoxedNoteCautionTab; // F2024-078 add adjustment to the space after the Note/Caution tab
|
||||||
}
|
}
|
||||||
private float AdjustToCharPosition(float position, float? CPI)
|
private float AdjustToCharPosition(float position, float? CPI)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user