C2018-039: Upgrade – User Control of Format
This commit is contained in:
@@ -515,7 +515,29 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
if (MyFormat.PlantFormat.FormatConfig == null) return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
|
||||
// see if there is UCF data, need to match the index of the ucf data to that in the original format, and
|
||||
// also need to check that LeftMargin is not null, since other docstyle data may exist in UCF but not PageLength:
|
||||
XmlNode par = this.XmlNode.ParentNode;
|
||||
string indx = null;
|
||||
XmlElement ele = par as XmlElement;
|
||||
if (ele.HasAttribute("Index")) indx = ele.GetAttribute("Index");
|
||||
if (indx == null) return LazyLoad(ref _PageLength, "@LeftMargin");
|
||||
if (MyFormat.PlantFormat.FormatConfig != null && this.MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles != null && MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles.Count > 0)
|
||||
{
|
||||
foreach (FormatConfig.DocStyle ds in MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles)
|
||||
{
|
||||
if (indx == ds.Index)
|
||||
{
|
||||
float? test = ds.Layout.LeftMargin;
|
||||
if (test != null) _LeftMargin = new LazyLoad<float?>(ds.Layout.LeftMargin);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -526,10 +548,33 @@ namespace VEPROMS.CSLA.Library
|
||||
[Description("Length of Page")]
|
||||
public float? PageLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _PageLength, "@PageLength");
|
||||
}
|
||||
get
|
||||
{
|
||||
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _PageLength, "@PageLength");
|
||||
if (MyFormat.PlantFormat.FormatConfig == null) return LazyLoad(ref _PageLength, "@PageLength");
|
||||
|
||||
// see if there is UCF data, need to match the index of the ucf data to that in the original format, and
|
||||
// also need to check that PageLength is not null, since other docstyle data may exist in UCF but not PageLength:
|
||||
XmlNode par = this.XmlNode.ParentNode;
|
||||
string indx = null;
|
||||
XmlElement ele = par as XmlElement;
|
||||
if (ele.HasAttribute("Index")) indx = ele.GetAttribute("Index");
|
||||
if (indx == null) return LazyLoad(ref _PageLength, "@PageLength");
|
||||
if (MyFormat.PlantFormat.FormatConfig != null && this.MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles != null && MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles.Count > 0)
|
||||
{
|
||||
foreach (FormatConfig.DocStyle ds in MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles)
|
||||
{
|
||||
if (indx == ds.Index)
|
||||
{
|
||||
float? test = ds.Layout.PageLength;
|
||||
if (test != null) _PageLength = new LazyLoad<float?>(ds.Layout.PageLength);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return LazyLoad(ref _PageLength, "@PageLength");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region PageWidth
|
||||
|
Reference in New Issue
Block a user