public void Load(XmlElement xmlElem) { this.autoFilter = bool.Parse(xmlElem.GetAttribute("autoFilter")); this.tradeType = (AccountTradeType)Enum.Parse(typeof(AccountTradeType), xmlElem.GetAttribute("tradeType")); this.delayTick = int.Parse(xmlElem.GetAttribute("delayTick")); this.delayTime = double.Parse(xmlElem.GetAttribute("delayTime")); this.slipType = (AccountSlipType)Enum.Parse(typeof(AccountSlipType), xmlElem.GetAttribute("slipType")); this.slipMinPrice = int.Parse(xmlElem.GetAttribute("slipMinPrice")); this.slipPerccent = double.Parse(xmlElem.GetAttribute("slipPerccent")); this.slipPrice = double.Parse(xmlElem.GetAttribute("slipPrice")); }
public static string GetName(AccountTradeType tradeType) { switch (tradeType) { case AccountTradeType.IMMEDIATELY: return("立即成交"); case AccountTradeType.MARKETPRICE: return("市价成交"); case AccountTradeType.DELAYTIME: return("延时成交"); case AccountTradeType.DELAYTICK: return("延迟tick成交"); } return(null); }