This commit is contained in:
Kathy Ruffing 2012-11-08 17:05:45 +00:00
parent 3795a3063d
commit daec29dc9a
3 changed files with 19 additions and 39 deletions

View File

@ -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;
}
set
{
_MyDocStyle = value;
}
}
private FormatInfo _ActiveFormat = null;

View File

@ -82,6 +82,18 @@ namespace VEPROMS.CSLA.Library
}
}
#endregion
#region IndexOtherThanFirstPage
[Category("Miscellaneous")]
[Description("IndexOtherThanFirstPage")]
private LazyLoad<int?> _IndexOtherThanFirstPage;
public int? IndexOtherThanFirstPage
{
get
{
return LazyLoad(ref _IndexOtherThanFirstPage, "@IndexOtherThanFirstPage");
}
}
#endregion
#region IsStepSection
[Category("Miscellaneous")]
[Description("Is a Step Section")]

View File

@ -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