private void ReadIndicators(XmlReader reader)
{
if (reader.HasAttributes)
{
while (reader.MoveToNextAttribute())
{
string attrName = reader.Name.ToLower();
switch (attrName)
{
case "inherit":
this._indicator_List.Inherit = this.getBool(reader.Value);
break;
}
}
reader.MoveToElement();
}
if (!reader.IsEmptyElement)
{
while (!(reader.NodeType == XmlNodeType.EndElement && reader.Name.Equals("indicators", StringComparison.OrdinalIgnoreCase)))
{
reader.Read();
if (reader.NodeType == XmlNodeType.Element && reader.Name.Equals("indicator", StringComparison.OrdinalIgnoreCase))
{
if (reader.HasAttributes)
{
var ic = new IndicatorConfig();
while (reader.MoveToNextAttribute())
{
string attrName = reader.Name.ToLower();
switch (attrName)
{
case "number":
ic.Number = int.Parse(reader.Value);
break;
case "color":
ic.Color = this.getColor(reader.Value);
break;
case "inherit":
ic.Inherit = this.getBool(reader.Value);
break;
case "isdrawnunder":
ic.IsDrawnUnder = this.getBool(reader.Value);
break;
case "style":
ic.Style = (IndicatorStyle)Enum.Parse(typeof(IndicatorStyle), reader.Value, true);
break;
}
}
this._indicator_List.Add(ic);
reader.MoveToElement();
}
}
}
}
reader.Read();
}