This commit is contained in:
parent
1081d01da2
commit
5cfc66af52
@ -2219,7 +2219,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
string parentTab = null;
|
string parentTab = null;
|
||||||
ItemInfo myparent = ActiveParent as ItemInfo;
|
ItemInfo myparent = ActiveParent as ItemInfo;
|
||||||
if (myparent != null && myparent.IsParagraph) myparent = myparent.ActiveParent as ItemInfo;
|
if (myparent != null && myparent.IsParagraph)
|
||||||
|
{
|
||||||
|
myparent = myparent.ActiveParent as ItemInfo;
|
||||||
|
if (myparent.MyTab.CleanText.Trim() == "")
|
||||||
|
{
|
||||||
|
if ((myparent.ActiveParent as ItemInfo).MyTab.CleanText.Trim() != "")
|
||||||
|
myparent = myparent.ActiveParent as ItemInfo;
|
||||||
|
}
|
||||||
|
}
|
||||||
parentTab = myparent.MyTab.CleanText.Trim();
|
parentTab = myparent.MyTab.CleanText.Trim();
|
||||||
tbformat = parentTab + (parentTab.EndsWith(".") ? "" : ".") + tbformat.TrimStart();
|
tbformat = parentTab + (parentTab.EndsWith(".") ? "" : ".") + tbformat.TrimStart();
|
||||||
}
|
}
|
||||||
@ -2254,7 +2262,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
tbformat = tbformat.Replace("{ROMAN}", roman);
|
tbformat = tbformat.Replace("{ROMAN}", roman);
|
||||||
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : ordinal.ToString().PadLeft(2));
|
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : ordinal.ToString().PadLeft(2));
|
||||||
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
|
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
|
||||||
|
tbformat = tbformat.Replace("{asterisk}", "*");
|
||||||
if (tbformat.IndexOf("{!C0}") > -1) // wolf creek uses this to get lines above/below step number
|
if (tbformat.IndexOf("{!C0}") > -1) // wolf creek uses this to get lines above/below step number
|
||||||
{
|
{
|
||||||
cltext = cltext == null ? tbformat.Replace("{!C0}", "") : cltext.Replace("{!C0}", "");
|
cltext = cltext == null ? tbformat.Replace("{!C0}", "") : cltext.Replace("{!C0}", "");
|
||||||
@ -2466,7 +2474,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (FormatStepData.TabData.Justify == "Center")
|
if (FormatStepData.TabData.Justify == "Center")
|
||||||
{
|
{
|
||||||
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
||||||
_MyHeader.Text = tbformat.Trim(); ;
|
_MyHeader.Text = tbformat.Replace("\\xA0"," ").Trim();
|
||||||
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
|
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
|
||||||
// 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. Also, if only one in group and tab text ends with 'S', remove it:
|
// with a bullet. Also, if only one in group and tab text ends with 'S', remove it:
|
||||||
@ -2646,6 +2654,39 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (tmp.Count > 0) _MyMacros = tmp;
|
if (tmp.Count > 0) _MyMacros = tmp;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
#region UseSmartTemplate
|
||||||
|
public int GetSmartTemplateIndex()
|
||||||
|
{
|
||||||
|
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;
|
||||||
|
int indx = 0;
|
||||||
|
// find the starting template in the list for the high level step type:
|
||||||
|
int highType = (int)MyHLS.MyContent.Type - 20001;
|
||||||
|
while (indx < formatData.Templates.Count)
|
||||||
|
{
|
||||||
|
// level of 0 starts a new group.
|
||||||
|
if (formatData.Templates[indx].level == 0)
|
||||||
|
{
|
||||||
|
indx++;
|
||||||
|
// now see if we're on the high level step type, if so, look under this one
|
||||||
|
// for the step type that we're on. If found return the index of it.
|
||||||
|
if (formatData.Templates[indx].type == highType)
|
||||||
|
{
|
||||||
|
if (MyHLS.ItemID == ItemID) return indx; // I'm on the HLS, return it.
|
||||||
|
indx++;
|
||||||
|
while (indx < formatData.Templates.Count && formatData.Templates[indx].level != 0)
|
||||||
|
{
|
||||||
|
if (formatData.Templates[indx].type == MyContent.Type - 20001)
|
||||||
|
return indx;
|
||||||
|
indx++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
indx++;
|
||||||
|
}
|
||||||
|
return -1; // didn't find this step type in the template width override list.
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region CheckOffs
|
#region CheckOffs
|
||||||
private string _SectionCheckOffHeader;
|
private string _SectionCheckOffHeader;
|
||||||
public string SectionCheckOffHeader
|
public string SectionCheckOffHeader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user