- 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

@@ -2746,7 +2746,15 @@ namespace VEPROMS.CSLA.Library
tbformat = tbformat.Replace("{numeric}", ordinal.ToString().PadLeft(2) + ".0");
tbformat = tbformat.Substring(0, tbformat.Length - 2);
}
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2,'0') : ordinal.ToString().PadLeft(2));
// if this is a wolf creek background, if the tbformat ends with a '.' don't add a space,
// otherwise add a space.
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfCreekBackgroundFormat && IsBackgroundStep())
{
string stpTab = (!tbformat.Contains(".")?" ":"") + ordinal.ToString();
tbformat = tbformat.Replace("{numeric}", stpTab);
}
else
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2,'0') : ordinal.ToString().PadLeft(2));
if (tbformate != null) tbformate = tbformate.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2, '0') : ordinal.ToString().PadLeft(2));
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
if (tbformat.Contains("{asterisk}"))
@@ -2844,11 +2852,11 @@ namespace VEPROMS.CSLA.Library
}
// also see if there is the 'pagelist' string in this tab:
else if ((FormatStepData.TabData.Font.Style & E_Style.Underline) == E_Style.Underline)
// the reason that the underline commands were not included in format file is that the '\' character
// is used as a separator and the following code will not impact other formats
HighLevelStepTabPageList = @"\ul " + FormatStepData.TabData.IdentAltPrint.Substring(0, indxnewtab).Trim() + @"\ulnone " + tbformat;
// the reason that the underline commands were not included in format file is that the '\' character
// is used as a separator and the following code will not impact other formats
HighLevelStepTabPageList = @"\ul " + FormatStepData.TabData.IdentAltPrint.Substring(0, indxnewtab).Trim() + @"\ulnone " + (tbformat.StartsWith(" ")?"":" ") + tbformat;
else
HighLevelStepTabPageList = FormatStepData.TabData.IdentAltPrint.Substring(0, indxnewtab) + tbformat;
HighLevelStepTabPageList = FormatStepData.TabData.IdentAltPrint.Substring(0, indxnewtab) + tbformat;
_MyTab.AltPrintTab = newtab;
if (tbformate != null && tbformate != "") tbformat = tbformate;
}
@@ -2867,7 +2875,15 @@ namespace VEPROMS.CSLA.Library
}
return false;
}
public bool IsBackgroundStep()
{
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfCreekBackgroundFormat)
{
if (IsHigh || IsCaution || IsNote) return true;
if (MyParent != null && MyParent.IsStep && MyParent.FormatStepData.Type.ToUpper() == "TITLEWITHTEXTBELOW" && FormatStepData.Type.ToUpper() != "IMPLICITOR") return true;
}
return false;
}
private bool InNote()
{
// walk up until procedure level and if finding a note type, return true, otherwise false.