Changed Section Notes and Cautions headers to include the Section Location

This commit is contained in:
Rich 2016-10-21 15:04:09 +00:00
parent 7660bd750a
commit 1b9d1cf902

View File

@ -4287,7 +4287,9 @@ namespace VEPROMS.CSLA.Library
} }
// For VC Summer Unit 2 & 3 (vcb formats) include step number in Note & Caution header // For VC Summer Unit 2 & 3 (vcb formats) include step number in Note & Caution header
if (FormatStepData.TabData.IncludeStepNum && MyHeader != null && MyParent != null && MyParent.CombinedTab != null) if (FormatStepData.TabData.IncludeStepNum && MyHeader != null && MyParent != null)
{
if (MyParent.CombinedTab != null)
{ {
// if my parent is a paragraph, then don't use the paragraph tab in the header, use the parent of the paragraph: // if my parent is a paragraph, then don't use the paragraph tab in the header, use the parent of the paragraph:
if (MyParent.IsParagraph) if (MyParent.IsParagraph)
@ -4301,6 +4303,20 @@ namespace VEPROMS.CSLA.Library
MyHeader.CleanText = MyHeader.CleanText + ((MyParent == null) ? "" : " Step " + MyParent.MyTab.CleanText.TrimEnd(".".ToCharArray())); MyHeader.CleanText = MyHeader.CleanText + ((MyParent == null) ? "" : " Step " + MyParent.MyTab.CleanText.TrimEnd(".".ToCharArray()));
} }
} }
else if (MyParent.IsStepSection && FormatStepData.TabData.IncludeSectionNum)
{
ItemInfo parent = MyParent;
if (parent.IsStepSection)
{
string parentTab = parent.MyTab.CleanText.TrimEnd(".".ToCharArray());
if (parentTab != "")
{
MyHeader.Text = MyHeader.Text + ((MyParent == null) ? "" : " Section " + parentTab);
MyHeader.CleanText = MyHeader.CleanText + ((MyParent == null) ? "" : " Section " + parentTab);
}
}
}
}
return tbformat; return tbformat;
} }