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() protected void SetTabText()
{ {
string cltext = null; string cltext = null;
//if (IsAnd)
// Console.WriteLine("and substep");
if (IsParagraph) if (IsParagraph)
{ {
_MyTab.Text = ""; _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 // 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" // 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)); tbformat = tbformat.Replace("{Section Prefix}", SectionPrefix(tbformat));
} }
string alpha = AlphabeticalNumbering(ordinal); string alpha = AlphabeticalNumbering(ordinal);
@ -2371,8 +2370,7 @@ namespace VEPROMS.CSLA.Library
} }
if (NextItem != null) if (NextItem != null)
{ {
//int nextStepType = ((int)NextItem.MyContent.Type) % 10000; nextStepData = NextItem.FormatStepData;
nextStepData = NextItem.FormatStepData; // ActiveFormat.PlantFormat.FormatData.StepDataList[nextStepType];
// tried to duplicate functionality from 16-bit code. // tried to duplicate functionality from 16-bit code.
nextTbFormat = NextItem.IsInRNO ? nextStepData.TabData.RNOIdentPrint : nextStepData.TabData.IdentPrint; nextTbFormat = NextItem.IsInRNO ? nextStepData.TabData.RNOIdentPrint : nextStepData.TabData.IdentPrint;
} }
@ -2399,13 +2397,7 @@ namespace VEPROMS.CSLA.Library
{ {
if (MyPrevious != null) _MyHeader = null; if (MyPrevious != null) _MyHeader = null;
tbformat = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; tbformat = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
if ((FormatStepData.TabData.Font.Style & E_Style.Underline) > 0) TabToIdentBAdjustFont();
{
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);
}
} }
return tbformat; return tbformat;
@ -2415,6 +2407,7 @@ namespace VEPROMS.CSLA.Library
if (tbformat != null && MyPrevious != null && !FormatStepData.AlwaysTab && (!FormatStepData.MixCautionsAndNotes || (tbformat == prevTbFormat))) if (tbformat != null && MyPrevious != null && !FormatStepData.AlwaysTab && (!FormatStepData.MixCautionsAndNotes || (tbformat == prevTbFormat)))
{ {
tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
TabToIdentBAdjustFont();
} }
// else if this has a next // else if this has a next
else if (tbformat != null && NextItem != null && !FormatStepData.AlwaysTab && 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)))))) ((prevTbFormat != tbformat && (NextItem.MyContent.Type == (int)(MyContent.Type % 10000))))))
{ {
tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
_MyTab.RemovedStyleUnderline = true;
TabToIdentBAdjustFont();
} }
return tbformat; 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) private string AlphabeticalNumbering(int number)
{ {
string retval = string.Empty; string retval = string.Empty;
@ -2682,6 +2688,12 @@ namespace VEPROMS.CSLA.Library
} }
public class Tab : MetaTag public class Tab : MetaTag
{ {
private bool _RemovedStyleUnderline = false;
public bool RemovedStyleUnderline
{
get { return _RemovedStyleUnderline; }
set { _RemovedStyleUnderline = value; }
}
public Tab(VE_Font font) public Tab(VE_Font font)
{ {
MyFont = font; MyFont = font;