logic to support NSP’s Note and Caution Tabs

This commit is contained in:
John Jenko 2013-04-18 15:54:39 +00:00
parent f0d9003d0d
commit 0fff0b09a8

View File

@ -2783,7 +2783,7 @@ namespace VEPROMS.CSLA.Library
}
return ActiveSection.MyTab.CleanText.TrimEnd();
}
private string CheckNoteCautionTab(string tbformat)
{
string prevTbFormat = null;
@ -2843,8 +2843,31 @@ namespace VEPROMS.CSLA.Library
((prevTbFormat != tbformat && (NextItem.MyContent.Type == (int)(MyContent.Type % 10000))))))
{
tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
//string bstr = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
//int bstrlen = bstr.Length;
//string tstr = tbformat.Substring(tbformat.Length - bstrlen);
//bool good = true;
//for (int i = 0; i < tstr.Length; i++)
// good = (tstr[i] == ' ');
//if (good)
// tbformat = tbformat.Substring(0, tbformat.Length - bstrlen) + bstr;
//else
// tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
if (TabToIdentBAdjustFont())
_MyTab.RemovedStyleUnderline = true;
_MyTab.RemovedStyleUnderline = true;
}
// Since we append the bullet (IdentB) to the Caution or Note tab (like in 16-bit code)
// we need to append blank characters when there is only one Note or Caution (thus no bullet)
// in order for the Note or Caution tab to consistantly print at the same horizontal location
else if (tbformat != null && !FormatStepData.AlwaysTab && !FormatStepData.MixCautionsAndNotes
&& (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB != null
&& ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB.Length > 0))
{
int identBLen = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB.Length;
string bbstr = new string(' ', identBLen);
tbformat = tbformat + bbstr;
if (TabToIdentBAdjustFont())
_MyTab.RemovedStyleUnderline = true;
}
return tbformat;
}