Support for Inactive document styles
Change ‘Count’ to ‘MaxIndex’ for ‘vlnIndexedFormatList’ Add Inactive flag
This commit is contained in:
@@ -24,7 +24,17 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
return (_DocStyleList == null) ? _DocStyleList = new DocStyleList(SelectNodes("DocStyle")): _DocStyleList;
|
||||
if (_DocStyleList == null)
|
||||
{
|
||||
DocStyleList tmp = new DocStyleList(SelectNodes("DocStyle"));
|
||||
DocStyleList retval = new DocStyleList(null);
|
||||
foreach (DocStyle ds in tmp)
|
||||
{
|
||||
if (!ds.Inactive) retval.Add(ds);
|
||||
}
|
||||
_DocStyleList = retval;
|
||||
}
|
||||
return (_DocStyleList);
|
||||
}
|
||||
set { _DocStyleList = value; }
|
||||
}
|
||||
@@ -34,7 +44,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#region DocStyleAll
|
||||
#region DocStyle
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class DocStyle : vlnFormatItem
|
||||
public class DocStyle : vlnFormatItem, IVlnIndexedFormatItem
|
||||
{
|
||||
public DocStyle(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public DocStyle() : base() { }
|
||||
@@ -106,6 +116,18 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Inactive
|
||||
[Category("Miscellaneous")]
|
||||
[Description("Is Active Section Type")]
|
||||
private LazyLoad<bool> _Inactive;
|
||||
public bool Inactive
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Inactive, "@Inactive");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region LandscapePageList
|
||||
[Category("Miscellaneous")]
|
||||
[Description("Should PageList be landscape")]
|
||||
@@ -393,9 +415,9 @@ namespace VEPROMS.CSLA.Library
|
||||
#endregion
|
||||
#region DocStyleList
|
||||
[TypeConverter(typeof(vlnListConverter<DocStyleList, DocStyle>))]
|
||||
public class DocStyleList : vlnFormatList<DocStyle>
|
||||
public class DocStyleList : vlnIndexedFormatList<DocStyle>
|
||||
{
|
||||
public DocStyleList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
public DocStyleList(XmlNodeList xmlNodeList) : base(xmlNodeList, null) { }
|
||||
}
|
||||
#endregion
|
||||
#region Layout
|
||||
|
Reference in New Issue
Block a user