C2017-008 Formats now have a grouping allowing us to change a symbol character’s font family, size, style, and/or the actual character
This commit is contained in:
@@ -1977,6 +1977,15 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
set { _ReplaceStrList = value; }
|
||||
}
|
||||
private ReplaceSymbolCharList _ReplaceSymbolCharList;
|
||||
public ReplaceSymbolCharList ReplaceSymbolCharList
|
||||
{
|
||||
get
|
||||
{
|
||||
return (_ReplaceSymbolCharList == null) ? _ReplaceSymbolCharList = new ReplaceSymbolCharList(SelectNodes("ReplaceSymbolChars/ReplaceChar")) : _ReplaceSymbolCharList;
|
||||
}
|
||||
set { _ReplaceSymbolCharList = value; }
|
||||
}
|
||||
private LazyLoad<int?> _SectionTitleLength;
|
||||
public int? SectionTitleLength
|
||||
{
|
||||
@@ -2999,6 +3008,90 @@ namespace VEPROMS.CSLA.Library
|
||||
public ReplaceStrList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
}
|
||||
#endregion
|
||||
#region ReplaceChar
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class ReplaceChar : vlnFormatItem
|
||||
{
|
||||
public ReplaceChar(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public ReplaceChar() : base() { }
|
||||
[Category("Strings")]
|
||||
private LazyLoad<string> _Unicode;
|
||||
public string Unicode
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Unicode, "@Unicode");
|
||||
}
|
||||
}
|
||||
[Category("Strings")]
|
||||
private LazyLoad<string> _Replace;
|
||||
public string Replace
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Replace, "@Replace");
|
||||
}
|
||||
}
|
||||
[Category("Strings")]
|
||||
private LazyLoad<string> _Family;
|
||||
public string Family
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Family, "@Family");
|
||||
}
|
||||
}
|
||||
[Category("FontStyle?")]
|
||||
private LazyLoad<E_Style?> _Style; // format has E_Style value. The public will translate it to a systemdrawing.FontStyle used in printing
|
||||
public FontStyle? Style
|
||||
{
|
||||
get
|
||||
{
|
||||
E_Style? eStyle = LazyLoad(ref _Style, "@Style");
|
||||
if (eStyle == null) return null; // not set in the format, return null
|
||||
FontStyle sdfStyle = FontStyle.Regular;
|
||||
if (eStyle != E_Style.None)
|
||||
{
|
||||
if (((eStyle & E_Style.Bold) != 0) || ((eStyle & E_Style.MmBold) != 0))
|
||||
sdfStyle |= FontStyle.Bold;
|
||||
if ((eStyle & E_Style.Italics) != 0)
|
||||
sdfStyle |= FontStyle.Italic;
|
||||
if ((eStyle & E_Style.Underline) != 0)
|
||||
sdfStyle |= FontStyle.Underline;
|
||||
}
|
||||
return sdfStyle; // return systemdrawing.FontStyle
|
||||
//return LazyLoad(ref _Style, "@Style");
|
||||
}
|
||||
}
|
||||
[Category("float?")]
|
||||
private LazyLoad<float?> _Size;
|
||||
public float? Size
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Size, "@Size");
|
||||
}
|
||||
}
|
||||
//public override string GetPDDisplayName()
|
||||
//{ return Unicode; }
|
||||
//public override string GetPDDescription()
|
||||
//{ return string.Format("Replace '{0}' with '{1}'", Unicode, Replace); }
|
||||
//public override string GetPDCategory()
|
||||
//{ return "Chars to Replace"; }
|
||||
//public override string ToString()
|
||||
//{
|
||||
// return Replace;
|
||||
//}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region ReplaceSymbolCharList
|
||||
[TypeConverter(typeof(vlnListConverter<ReplaceSymbolCharList, ReplaceChar>))]
|
||||
public class ReplaceSymbolCharList : vlnFormatList<ReplaceChar>
|
||||
{
|
||||
public ReplaceSymbolCharList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
}
|
||||
#endregion
|
||||
#region StepSectionLayoutData
|
||||
public class StepSectionLayoutData : vlnFormatItem
|
||||
{
|
||||
|
Reference in New Issue
Block a user