This commit is contained in:
Kathy Ruffing 2010-09-10 17:48:24 +00:00
parent b6ea14f1b3
commit 759824dd34
2 changed files with 81 additions and 11 deletions

View File

@ -1243,7 +1243,7 @@ namespace VEPROMS.CSLA.Library
private static string ReplaceSpecialCharacters(string rtf) private static string ReplaceSpecialCharacters(string rtf)
{ {
string retval = rtf; string retval = rtf;
retval = retval.Replace("`", "\u00BA");// Degree retval = retval.Replace("`", "\u00B0");// Degree
retval = Regex.Replace(retval, @"\\u[0-9]+[?]", new MatchEvaluator(ReplaceSpecialCharacter)); retval = Regex.Replace(retval, @"\\u[0-9]+[?]", new MatchEvaluator(ReplaceSpecialCharacter));
retval = Regex.Replace(retval, @"\\'[0-9A-Fa-f][0-9A-Fa-f]", new MatchEvaluator(ReplaceSpecialHexCharacter)); retval = Regex.Replace(retval, @"\\'[0-9A-Fa-f][0-9A-Fa-f]", new MatchEvaluator(ReplaceSpecialHexCharacter));
return retval; return retval;
@ -1850,7 +1850,10 @@ namespace VEPROMS.CSLA.Library
if (!_TagsSetup) SetupTags(); if (!_TagsSetup) SetupTags();
return _MyHeader; return _MyHeader;
} }
set { _MyHeader = value; } set
{
_MyHeader = value;
}
} }
[NonSerialized] [NonSerialized]
protected MetaTag _MyFooter; protected MetaTag _MyFooter;
@ -1870,8 +1873,8 @@ namespace VEPROMS.CSLA.Library
if (IsStep) if (IsStep)
{ {
MyTab = new Tab(AdjustForTextSubFollowsTextStyle(FormatStepData.TabData.Font)); MyTab = new Tab(AdjustForTextSubFollowsTextStyle(FormatStepData.TabData.Font));
MyHeader = new MetaTag(FormatStepData.TabData.Font); _MyHeader = new MetaTag(FormatStepData.TabData.Font);
MyFooter = new MetaTag(FormatStepData.TabData.Font); _MyFooter = new MetaTag(FormatStepData.TabData.Font);
SetTabText(); SetTabText();
} }
else else
@ -1971,7 +1974,7 @@ namespace VEPROMS.CSLA.Library
{ {
if (_MyHeader == null) _MyHeader = new MetaTag(FormatStepData.TabData.Font); if (_MyHeader == null) _MyHeader = new MetaTag(FormatStepData.TabData.Font);
_MyHeader.Text = _MyHeader.CleanText = FormatStepData.Sep; _MyHeader.Text = _MyHeader.CleanText = FormatStepData.Sep;
MyHeader.Justify = ContentAlignment.MiddleCenter; _MyHeader.Justify = ContentAlignment.MiddleCenter;
} }
#region Non HLP tab TODO #region Non HLP tab TODO
// other possible 'tokens' // other possible 'tokens'
@ -2036,9 +2039,8 @@ namespace VEPROMS.CSLA.Library
// Handle the centered tab - if this tab is centered make it a header. // Handle the centered tab - if this tab is centered make it a header.
if (FormatStepData.TabData.Justify == "Center") if (FormatStepData.TabData.Justify == "Center")
{ {
if (_MyHeader == null) _MyHeader = new MetaTag(FormatStepData.TabData.Font); _MyHeader.Justify = ContentAlignment.MiddleCenter;
MyHeader.Justify = ContentAlignment.MiddleCenter; _MyHeader.Text = _MyHeader.CleanText = tbformat.Trim(); ;
MyHeader.Text = MyHeader.CleanText = tbformat.Trim(); ;
// if there is only step in the group - no bullet is used, if more that one replace the tab // if there is only step in the group - no bullet is used, if more that one replace the tab
// with a bullet // with a bullet
@ -2046,7 +2048,7 @@ namespace VEPROMS.CSLA.Library
tbformat = ""; tbformat = "";
else else
{ {
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) if ((FormatStepData.TabData.Font.Style & E_Style.Underline) > 0)
{ {

View File

@ -452,6 +452,62 @@ namespace VEPROMS.CSLA.Library
if (item == null) return ""; if (item == null) return "";
string sret = ""; string sret = "";
switch (item.MyContent.Type / 10000) switch (item.MyContent.Type / 10000)
{
case 0: //procedure
sret = ProcedureInfo.Get(item.ItemID).MyTab.CleanText;
break;
case 1: // section
sret = SectionInfo.Get(item.ItemID).MyTab.CleanText;
break;
case 2: // step
ItemInfo pitem = item;
while (!pitem.IsHigh)
{
string thisTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText;
if (pitem.IsRNOPart)
{
//string mytb = sret.Trim(" .)".ToCharArray());
if (thisTab == null || thisTab == "")
sret = "RNO." + sret;
else
{
thisTab = thisTab.Trim(" ".ToCharArray());
sret = "RNO." + thisTab + sret;
}
}
else
{
//sret = Tab(item.ActiveParent as ItemInfo) + "." + sret.Trim(" .)".ToCharArray()); //original
if (thisTab != null && thisTab != "")
{
thisTab = thisTab.Trim(" ".ToCharArray());
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")")) thisTab = thisTab + ".";
}
sret = thisTab + sret;
}
pitem = pitem.ActiveParent as ItemInfo;
if (pitem == null) break;
}
// add hls tab.
if (pitem.IsHigh)
{
string hlsTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText;
hlsTab = hlsTab.Trim(" ".ToCharArray());
if (!hlsTab.EndsWith(".") && !hlsTab.EndsWith(")")) hlsTab = hlsTab + ".";
sret = hlsTab + sret;
}
break;
}
sret = sret.Trim(" .)".ToCharArray());
return sret;
}
private static string RhmTab(ItemInfo item)
{
if (item == null) return "";
if (item.ItemID == 2065) Console.WriteLine("here");
string sret = "";
switch (item.MyContent.Type / 10000)
{ {
case 0: //procedure case 0: //procedure
sret = ProcedureInfo.Get(item.ItemID).MyTab.CleanText; sret = ProcedureInfo.Get(item.ItemID).MyTab.CleanText;
@ -472,11 +528,23 @@ namespace VEPROMS.CSLA.Library
sret = Tab(item.ActiveParent as ItemInfo) + ".RNO." + sret.Trim(" .)".ToCharArray()); sret = Tab(item.ActiveParent as ItemInfo) + ".RNO." + sret.Trim(" .)".ToCharArray());
} }
else else
sret = Tab(item.ActiveParent as ItemInfo) + "." + sret.Trim(" .)".ToCharArray()); {
//sret = Tab(item.ActiveParent as ItemInfo) + "." + sret.Trim(" .)".ToCharArray()); //original
string tmp1 = sret.Contains(@")") ? ")" : ".";
string tmp2 = sret.Trim(" .)".ToCharArray());
string srettmp = Tab(item.ActiveParent as ItemInfo);
sret = srettmp + sret.Trim(" ".ToCharArray());
if (!sret.EndsWith(".") && !sret.EndsWith(")")) sret = sret + ".";
}
}
else
{
sret = sret.Trim(" ".ToCharArray());
if (!sret.EndsWith(".") && !sret.EndsWith(")")) sret = sret + ".";
} }
break; break;
} }
sret = sret.Trim(" .)".ToCharArray()); //sret = sret.Trim(" .)".ToCharArray()); // original
return sret; return sret;
} }
private static bool AddStepNumber(bool textAdded, TransitionBuilder tb, string token, string nonToken) private static bool AddStepNumber(bool textAdded, TransitionBuilder tb, string token, string nonToken)