public override void Setup_BeforeAdd(XML xml)
{
base.Setup_BeforeAdd(xml);
string str;
str = xml.GetAttribute("font");
if (str != null)
_textFormat.font = str;
str = xml.GetAttribute("fontSize");
if (str != null)
_textFormat.size = int.Parse(str);
str = xml.GetAttribute("color");
if (str != null)
_textFormat.color = ToolSet.ConvertFromHtmlColor(str);
str = xml.GetAttribute("align");
if (str != null)
this.align = FieldTypes.ParseAlign(str);
str = xml.GetAttribute("vAlign");
if (str != null)
this.verticalAlign = FieldTypes.ParseVerticalAlign(str);
str = xml.GetAttribute("leading");
if (str != null)
_textFormat.lineSpacing = int.Parse(str);
str = xml.GetAttribute("letterSpacing");
if (str != null)
_textFormat.letterSpacing = int.Parse(str);
_ubbEnabled = xml.GetAttributeBool("ubb", false);
str = xml.GetAttribute("autoSize");
if (str != null)
this.autoSize = FieldTypes.ParseAutoSizeType(str);
_textFormat.underline = xml.GetAttributeBool("underline", false);
_textFormat.italic = xml.GetAttributeBool("italic", false);
_textFormat.bold = xml.GetAttributeBool("bold", false);
this.singleLine = xml.GetAttributeBool("singleLine", false);
str = xml.GetAttribute("strokeColor");
if (str != null)
{
this.strokeColor = ToolSet.ConvertFromHtmlColor(str);
this.stroke = xml.GetAttributeInt("strokeSize", 1);
}
str = xml.GetAttribute("shadowColor");
if (str != null)
{
this.strokeColor = ToolSet.ConvertFromHtmlColor(str);
this.shadowOffset = xml.GetAttributeVector("shadowOffset");
}
}