public void Load(XmlElement xmlElem) { string type = xmlElem.GetAttribute("datatype"); if ("kline".Equals(type)) { dataKey = new KLineKey(); ((KLineKey)dataKey).Load(xmlElem); } else if ("timeline".Equals(type)) { dataKey = new TimeLineKey(); ((TimeLineKey)dataKey).Load(xmlElem); } XmlNode node = xmlElem.ChildNodes[0]; if (node is XmlElement) { XmlElement elem = (XmlElement)node; this.title = new StrategyGraphicTitle(); this.title.Load(elem); } this.priceShapes = new PriceShapeContainer(); this.priceShapes.Load(xmlElem); }
public StrategyGraphic(IDataKey dataKey) { this.dataKey = dataKey; this.title = new StrategyGraphicTitle(); this.priceShapes = new PriceShapeContainer(); }