Use ‘DocStyleListActive’ for section types
This commit is contained in:
parent
96f25e72e4
commit
238c92502f
@ -174,7 +174,7 @@ namespace VEPROMS
|
||||
bool isWordSect = true;
|
||||
int sectype = (int)sectinfo.MyContent.Type - 10000;
|
||||
PlantFormat pf = sectinfo.ActiveFormat.PlantFormat;
|
||||
foreach (DocStyle ds in pf.DocStyles.DocStyleList)
|
||||
foreach (DocStyle ds in pf.DocStyles.DocStyleListActive)
|
||||
{
|
||||
if (ds.Index == sectype)
|
||||
{
|
||||
@ -505,7 +505,7 @@ namespace VEPROMS
|
||||
if (pf != opf)
|
||||
{
|
||||
oldDocStyles = new DocStyleList(null);
|
||||
foreach (DocStyle ds in opf.DocStyles.DocStyleList)
|
||||
foreach (DocStyle ds in opf.DocStyles.DocStyleListActive)
|
||||
{
|
||||
if (_isStepSection && ds.IsStepSection)
|
||||
oldDocStyles.Add(ds); // find only step section types
|
||||
@ -519,7 +519,7 @@ namespace VEPROMS
|
||||
|
||||
DocStyleList newDocStyles = new DocStyleList(null);
|
||||
int selindx = -1;
|
||||
foreach (DocStyle nds in pf.DocStyles.DocStyleList)
|
||||
foreach (DocStyle nds in pf.DocStyles.DocStyleListActive)
|
||||
{
|
||||
if (_isStepSection && nds.IsStepSection)
|
||||
newDocStyles.Add(nds); // add only step section types
|
||||
|
@ -28,16 +28,32 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
DocStyleList tmp = new DocStyleList(SelectNodes("DocStyle"));
|
||||
DocStyleList retval = new DocStyleList(null);
|
||||
foreach (DocStyle ds in tmp)
|
||||
{
|
||||
if (!ds.Inactive) retval.Add(ds);
|
||||
}
|
||||
foreach (DocStyle ds in tmp) retval.Add(ds);
|
||||
_DocStyleList = retval;
|
||||
}
|
||||
return (_DocStyleList);
|
||||
}
|
||||
set { _DocStyleList = value; }
|
||||
}
|
||||
private DocStyleList _DocStyleListActive;
|
||||
public DocStyleList DocStyleListActive
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_DocStyleListActive == null)
|
||||
{
|
||||
DocStyleList tmp = new DocStyleList(SelectNodes("DocStyle"));
|
||||
DocStyleList retval = new DocStyleList(null);
|
||||
foreach (DocStyle ds in tmp)
|
||||
{
|
||||
if (!ds.Inactive) retval.Add(ds);
|
||||
}
|
||||
_DocStyleListActive = retval;
|
||||
}
|
||||
return (_DocStyleListActive);
|
||||
}
|
||||
set { _DocStyleListActive = value; }
|
||||
}
|
||||
public DocStyles(XmlNode xmlNode) : base(xmlNode) { }
|
||||
}
|
||||
#endregion
|
||||
|
Loading…
x
Reference in New Issue
Block a user