- Add support to Caution/Note tabs for WCNBCK Pagelist items

Improve Spacing of WCN Background pagelist items tabs
This commit is contained in:
2014-02-14 16:42:30 +00:00
parent 27c80cde33
commit bee1332737
3 changed files with 29 additions and 18 deletions

View File

@@ -1344,16 +1344,6 @@ namespace Volian.Print.Library
foreach (vlnParagraph child in ChildrenBelow)
child.BuildLocationList(yTopMost, myLocations);
}
private bool IsBackgroundStep()
{
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfCreekBackgroundFormat)
{
if (MyItemInfo.IsHigh || MyItemInfo.IsCaution || MyItemInfo.IsNote) return true;
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.IsStep && MyItemInfo.MyParent.FormatStepData.Type.ToUpper() == "TITLEWITHTEXTBELOW" && MyItemInfo.FormatStepData.Type.ToUpper() != "IMPLICITOR") return true;
}
return false;
}
private int COL_WID_ADJ = 6; // adjusts for incorrect use of WidSTable when breaking a line (it breaks 6 chars too short)
private bool IsTitleType(ItemInfo itm)
{
@@ -1681,7 +1671,7 @@ namespace Volian.Print.Library
}
// For background formats, HLS's or Caution or any Notes have tab on line and then text
// on line below (with space in between)
if (IsBackgroundStep() && itemInfo.MyTab != null && itemInfo.MyTab.AltPrintTab != null && itemInfo.MyTab.AltPrintTab.Trim() != "")
if (itemInfo.IsBackgroundStep() && itemInfo.MyTab != null && itemInfo.MyTab.AltPrintTab != null && itemInfo.MyTab.AltPrintTab.Trim() != "")
yoff = YOffset = yoff + (2 * SixLinesPerInch);
float yForCheckoff = yoff; //0; - default checkoff row is same as FIRST line of text
@@ -2768,7 +2758,7 @@ namespace Volian.Print.Library
}
int? bxIndx = itemInfo.FormatStepData.StepLayoutData.STBoxindex;
float? colOvrd = itemInfo.FormatStepData.ColOverride;
if (IsBackgroundStep())
if (itemInfo.IsBackgroundStep())
{
if (myTab != null) myTab.XOffset = XOffset;
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * 2); // indent 2 characters for background steps