public void Load(XmlElement xmlElem) { this.useTickData = bool.Parse(xmlElem.GetAttribute("useTickData")); this.useTimeLineData = bool.Parse(xmlElem.GetAttribute("useTimeLineData")); XmlNodeList nodes = xmlElem.GetElementsByTagName("period"); foreach (XmlNode node in nodes) { XmlElement elem = (XmlElement)node; KLinePeriod period = new KLinePeriod(); period.Load(elem); this.usedKLinePeriods.Add(period); } }
public void Load(XmlElement xmlElem) { XmlNodeList nodes = xmlElem.ChildNodes; foreach (XmlNode node in nodes) { if (node is XmlElement) { XmlElement elemDrawer = (XmlElement)node; StrategyDrawer_PriceRect drawer = new StrategyDrawer_PriceRect(); drawer.Load(elemDrawer); KLinePeriod klinePeriod = new KLinePeriod(); klinePeriod.Load(elemDrawer); //KLinePeriod klinePeriod = (KLinePeriod)EnumUtils.Parse(typeof(KLinePeriod), elemDrawer.GetAttribute("klineperiod")); this.dic_KLinePeriod_Drawer.Add(klinePeriod, drawer); } } }