This commit is contained in:
Kathy Ruffing 2012-11-27 15:11:16 +00:00
parent 87ab671908
commit ac46422ffe

View File

@ -1068,6 +1068,22 @@ namespace VEPROMS.CSLA.Library
return parent.HasAncestor(ancestor);
}
#endregion
public int FoldoutIndex()
{
if ((ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0) return 0;
// now check for floating foldouts. If there is a floating foldout, also find which one it uses.
// This is data off of the ?
if (ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && ActiveSection.IsDefaultSection)
{
StepConfig sc = MyConfig as StepConfig;
int iiForFoldout = sc != null ? sc.Step_FloatingFoldout : -1;
if (iiForFoldout <= 0) return -1;
// FOR NOW, Just return the first one. Later need to find foldout list & return the one we're pointing
// to.
return 0;
}
return -1; // does not have a foldout
}
#region More IsType
public bool IsProcedurePart
{
@ -2164,7 +2180,7 @@ namespace VEPROMS.CSLA.Library
}
int stepType = (int)(MyContent.Type % 10000);
string tbformat = IsInRNO ? FormatStepData.TabData.RNOIdentPrint : FormatStepData.TabData.IdentPrint;
if (ActiveFormat.Name == "WCNCKL")
if (ActiveFormat.Name.ToUpper() == "WCNCKL" || ActiveFormat.Name.ToUpper() == "WSTCKL")
{
tbformat = FormatStepData.TabData.IdentEdit;
if (FormatStepData.StepLayoutData.AlignWithParentTab) tbformat = tbformat.TrimStart(" ".ToCharArray());
@ -2216,7 +2232,10 @@ namespace VEPROMS.CSLA.Library
if (useSubStepTabs || tbformat.IndexOf("{seq}") > -1)
{
int itmp = (localPrintLevel + PrintBias) % seqtabs.Count;
if (!tbformat.Contains("C0"))
tbformat = seqtabs[itmp].PrintTabFormat; // seqtab in 16bit, i.e. '. or )' etc.
else
tbformat = tbformat.Replace("{seq}", seqtabs[itmp].PrintTabFormat);
string tbtoken = seqtabs[localPrintLevel % seqtabs.Count].TabToken; // seqstart in 16bit, number/letter
tbformat = tbformat.Replace("{seq}", tbtoken);
}
@ -2276,7 +2295,7 @@ namespace VEPROMS.CSLA.Library
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : ordinal.ToString().PadLeft(2));
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)
{
cltext = cltext == null ? tbformat.Replace("{!C0}", "") : cltext.Replace("{!C0}", "");
cltext = cltext + " ";
@ -3932,6 +3951,8 @@ namespace VEPROMS.CSLA.Library
{
// if there is a number after the '.', return it as a number. For example if it is 001, return a 1:
string tmpstr = indx+1<DisplayNumber.Length?DisplayNumber.Substring(indx+1):null;
// if the section's tab is a letter, we don't want a 0 on the section.... for example A.0.
if (IsSection && tmpstr == null && System.Char.IsLetter(DisplayNumber, 0)) return -1;
return tmpstr==null?0:System.Convert.ToInt32(tmpstr);
}
return (-1);