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(AccountSlipType slipType) { switch (slipType) { case AccountSlipType.NOSLIP: return("不滑点"); case AccountSlipType.MINPRICE: return("最小价格滑点"); case AccountSlipType.PERCENT: return("百分比价格滑点"); case AccountSlipType.PRICE: return("绝对价格滑点"); } return(null); }