C2021-004 get defined table shading options from format file
This commit is contained in:
parent
bd10b76d26
commit
ec264b869d
@ -530,6 +530,16 @@ namespace VEPROMS.CSLA.Library
|
||||
return _FontSizes == null ? _FontSizes = new FontSizes(SelectSingleNode("FontSizes")) : _FontSizes;
|
||||
}
|
||||
}
|
||||
// C2021-004 This gets the list for additional shading options defined in the format (base) file
|
||||
private ShadingOptionList _ShadingOptionList;
|
||||
public ShadingOptionList ShadingOptionList
|
||||
{
|
||||
get
|
||||
{
|
||||
return (_ShadingOptionList == null) ? _ShadingOptionList = new ShadingOptionList(SelectNodes("MoreShadingOptions/ShadingOption")) : _ShadingOptionList;
|
||||
}
|
||||
set { _ShadingOptionList = value; }
|
||||
}
|
||||
private SymbolList _SymbolList;
|
||||
public SymbolList SymbolList
|
||||
{
|
||||
@ -890,6 +900,84 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region ShadingOptions
|
||||
// C2021-004 Additional shading color options defined in the format file
|
||||
/* Example XML in base format file:
|
||||
<MoreShadingOptions>
|
||||
<ShadingOption A="255" R="211" G="211" B="211" Desc="15% Gray" />
|
||||
</MoreShadingOptions>
|
||||
**/
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class ShadingOption : vlnFormatItem
|
||||
{
|
||||
public ShadingOption(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public ShadingOption() : base() { }
|
||||
[Category("Ints")]
|
||||
private LazyLoad<int?> _Alpha;
|
||||
public int? Alpha
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Alpha, "@A");
|
||||
}
|
||||
}
|
||||
[Category("Ints")]
|
||||
private LazyLoad<int?> _Red;
|
||||
public int? Red
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Red, "@R");
|
||||
}
|
||||
}
|
||||
[Category("Ints")]
|
||||
private LazyLoad<int?> _Green;
|
||||
public int? Green
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Green, "@G");
|
||||
}
|
||||
}
|
||||
[Category("Ints")]
|
||||
private LazyLoad<int?> _Blue;
|
||||
public int? Blue
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Blue, "@B");
|
||||
}
|
||||
}
|
||||
[Category("Strings")]
|
||||
private LazyLoad<string> _Desc;
|
||||
public string Desc
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Desc, "@Desc");
|
||||
}
|
||||
}
|
||||
public override string GetPDDisplayName()
|
||||
{ return Desc; }
|
||||
public override string GetPDDescription()
|
||||
{ return string.Format("Shading Description '{0}' Alpha {1} Red {2} Green {3} Blue {4}", Desc, Alpha, Red, Green, Blue); }
|
||||
public override string GetPDCategory()
|
||||
{ return "Additional Shading Options"; }
|
||||
public override string ToString()
|
||||
{
|
||||
return Desc;
|
||||
}
|
||||
public string GetARBGstringForTableCells()
|
||||
{
|
||||
return string.Format("[A={0}, R={1}, G={2}, B={3}]", Alpha, Red, Green, Blue);
|
||||
}
|
||||
}
|
||||
[TypeConverter(typeof(vlnListConverter<ShadingOptionList, ShadingOption>))]
|
||||
public class ShadingOptionList : vlnFormatList<ShadingOption>
|
||||
{
|
||||
public ShadingOptionList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
}
|
||||
#endregion
|
||||
#region Symbols
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class Symbol : vlnFormatItem
|
||||
|
Loading…
x
Reference in New Issue
Block a user