diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index abd64819..d7c8fa24 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -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 { @@ -2161,10 +2177,10 @@ namespace VEPROMS.CSLA.Library _MyTab.Text = ""; _MyTab.CleanText = ""; return; - } + } 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; - tbformat = seqtabs[itmp].PrintTabFormat; // seqtab in 16bit, i.e. '. or )' etc. + 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