diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index fe5121c2..de8eae4e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1964,55 +1964,22 @@ namespace VEPROMS.CSLA.Library _ActiveSection = value; } } - private bool _DidFirstPageDocStyle = false; - public bool DidFirstPageDocStyle - { - get { return _DidFirstPageDocStyle; } - set - { - if (!_DidFirstPageDocStyle) - { - _DidFirstPageDocStyle = value; - _MyDocStyle = null; - } - } - } private DocStyle _MyDocStyle; - private DocStyle _MyDocStyleOtherThanFirstPage; public DocStyle MyDocStyle { get { - ItemInfo prevSection = (ActiveSection != null) ? ActiveSection.MyPrevious : null; if (_MyDocStyle == null && ActiveSection != null) - //if ((_MyDocStyle == null && ActiveSection != null) || - // (!_DidFirstPageDocStyle && - // _MyDocStyle.IsStepSection && - // prevSection != null && - // ((SectionConfig)ActiveSection.MyConfig).Section_Pagination == SectionConfig.SectionPagination.Continuous)) { int typ = (int)ActiveSection.MyContent.Type; int subtyp = typ % 10000; _MyDocStyle = ActiveFormat.PlantFormat.DocStyles.DocStyleList[subtyp]; - if (((_MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) != 0) && _DidFirstPageDocStyle) - { - if (_MyDocStyleOtherThanFirstPage == null) - { - foreach (DocStyle ds in ActiveFormat.PlantFormat.DocStyles.DocStyleList) - { - if ((ds.StructureStyle.Where & E_DocStyleUse.UseOnAllButFirstPage) != 0) - { - _MyDocStyleOtherThanFirstPage = ds; - break; - } - } - } - } } - if (_MyDocStyleOtherThanFirstPage == null) - return _MyDocStyle; - else - return _MyDocStyleOtherThanFirstPage; + return _MyDocStyle; + } + set + { + _MyDocStyle = value; } } private FormatInfo _ActiveFormat = null; diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs index 64338d48..5f319973 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs @@ -82,6 +82,18 @@ namespace VEPROMS.CSLA.Library } } #endregion + #region IndexOtherThanFirstPage + [Category("Miscellaneous")] + [Description("IndexOtherThanFirstPage")] + private LazyLoad _IndexOtherThanFirstPage; + public int? IndexOtherThanFirstPage + { + get + { + return LazyLoad(ref _IndexOtherThanFirstPage, "@IndexOtherThanFirstPage"); + } + } + #endregion #region IsStepSection [Category("Miscellaneous")] [Description("Is a Step Section")] diff --git a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs index 803614b0..3b4aadce 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs @@ -163,7 +163,8 @@ namespace VEPROMS.CSLA.Library }; public enum E_DocStyleUse : uint { - UseOnAllPages = 0, UseOnFirstPage = 1, UseOnAllButFirstPage = 2, UseOnLastPage = 4 + UseOnAllPages = 0, UseOnFirstPage = 1, UseOnAllButFirstPage = 2 + // , UseOnLastPage = 4 This flag does not have supporting code. }; [Flags] // acceptence list for adding Tables, Cautions, Notes, Substeps, Next, Previous and RNO