This commit is contained in:
Kathy Ruffing 2012-03-30 10:55:49 +00:00
parent f90dfb4908
commit 2d507b7304

View File

@ -2076,8 +2076,6 @@ namespace VEPROMS.CSLA.Library
protected void SetTabText()
{
string cltext = null;
//if (IsAnd)
// Console.WriteLine("and substep");
if (IsParagraph)
{
_MyTab.Text = "";
@ -2154,7 +2152,8 @@ namespace VEPROMS.CSLA.Library
{
// if there is a section prefix, trim any spaces from the start of this tab, so we don't have
// a tab that looks like "1. 1"
if (ActiveSection.MyTab.CleanText != null && ActiveSection.MyTab.CleanText != "") trimTabStart = true;
string tmpsectpref = SectionPrefix(tbformat) ?? string.Empty;
if (ActiveSection.MyTab.CleanText != null && ActiveSection.MyTab.CleanText != "" && tmpsectpref != string.Empty) trimTabStart = true;
tbformat = tbformat.Replace("{Section Prefix}", SectionPrefix(tbformat));
}
string alpha = AlphabeticalNumbering(ordinal);
@ -2371,8 +2370,7 @@ namespace VEPROMS.CSLA.Library
}
if (NextItem != null)
{
//int nextStepType = ((int)NextItem.MyContent.Type) % 10000;
nextStepData = NextItem.FormatStepData; // ActiveFormat.PlantFormat.FormatData.StepDataList[nextStepType];
nextStepData = NextItem.FormatStepData;
// tried to duplicate functionality from 16-bit code.
nextTbFormat = NextItem.IsInRNO ? nextStepData.TabData.RNOIdentPrint : nextStepData.TabData.IdentPrint;
}
@ -2399,13 +2397,7 @@ namespace VEPROMS.CSLA.Library
{
if (MyPrevious != null) _MyHeader = null;
tbformat = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
if ((FormatStepData.TabData.Font.Style & E_Style.Underline) > 0)
{
FontStyle style = FontStyle.Regular;
if ((FormatStepData.TabData.Font.Style & E_Style.Bold) > 0) style |= FontStyle.Bold;
if ((FormatStepData.TabData.Font.Style & E_Style.Italics) > 0) style |= FontStyle.Italic;
_MyTab.MyFont.WindowsFont = new Font(FormatStepData.TabData.Font.WindowsFont.FontFamily, FormatStepData.TabData.Font.WindowsFont.Size, style);
}
TabToIdentBAdjustFont();
}
return tbformat;
@ -2415,6 +2407,7 @@ namespace VEPROMS.CSLA.Library
if (tbformat != null && MyPrevious != null && !FormatStepData.AlwaysTab && (!FormatStepData.MixCautionsAndNotes || (tbformat == prevTbFormat)))
{
tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
TabToIdentBAdjustFont();
}
// else if this has a next
else if (tbformat != null && NextItem != null && !FormatStepData.AlwaysTab &&
@ -2423,9 +2416,22 @@ namespace VEPROMS.CSLA.Library
((prevTbFormat != tbformat && (NextItem.MyContent.Type == (int)(MyContent.Type % 10000))))))
{
tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
_MyTab.RemovedStyleUnderline = true;
TabToIdentBAdjustFont();
}
return tbformat;
}
private void TabToIdentBAdjustFont()
{
if ((FormatStepData.TabData.Font.Style & E_Style.Underline) > 0)
{
FontStyle style = FontStyle.Regular;
if ((FormatStepData.TabData.Font.Style & E_Style.Bold) > 0) style |= FontStyle.Bold;
if ((FormatStepData.TabData.Font.Style & E_Style.Italics) > 0) style |= FontStyle.Italic;
_MyTab.MyFont.WindowsFont = new Font(FormatStepData.TabData.Font.WindowsFont.FontFamily, FormatStepData.TabData.Font.WindowsFont.Size, style);
}
}
private string AlphabeticalNumbering(int number)
{
string retval = string.Empty;
@ -2682,6 +2688,12 @@ namespace VEPROMS.CSLA.Library
}
public class Tab : MetaTag
{
private bool _RemovedStyleUnderline = false;
public bool RemovedStyleUnderline
{
get { return _RemovedStyleUnderline; }
set { _RemovedStyleUnderline = value; }
}
public Tab(VE_Font font)
{
MyFont = font;