Exemplo n.º 1
0
 public void AddTrade(Trade trade)
 {
     App.Current.Dispatcher.Invoke(() =>
     {
         this.Trades.Insert(0, trade);
     });
 }
Exemplo n.º 2
0
 public override void OnRtnTrade(ThostFtdcTradeField pTrade)
 {
     var trade = new Trade
     {
         InstrumentID = pTrade.InstrumentID,
         UserID = pTrade.UserID,
         Direction = (DirectionType)pTrade.Direction,
         OffsetFlag = (OffsetFlag)pTrade.OffsetFlag,
         Price = pTrade.Price,
         Volume = pTrade.Volume,
         TradeTime = DateTimeHelper.GenerateTime(pTrade.TradeDate, pTrade.TradeTime),
     };
     TradeRecordViewModel.Instance.AddTrade(trade);
 }