public QuotePriceClient(QuoteMessage quoteMessage,int waitTimes,Customer customer) { this._CustomerClient = customer; this._ExchangeCode = quoteMessage.ExchangeCode; this._CustomerId = quoteMessage.CustomerID; this._InstrumentId = quoteMessage.InstrumentID; this._QuoteLot = (decimal)quoteMessage.QuoteLot; this._AnswerLot = (decimal)quoteMessage.QuoteLot; this._BSStatus = quoteMessage.BSStatus; this._WaitTimes = waitTimes; }
private bool Process(QuoteMessage quoteMessage) { if (quoteMessage != null) { try { this.QuotePriceToDealerEvent(quoteMessage); return true; } catch (Exception ex) { this.HandleException(ex); } } return true; }
public QuotePriceClient(QuoteMessage quoteMessage, int waitTimes, InstrumentClient instrument, Customer customer, ExchangeQuotation quotation) { this._ExchangeQuotation = quotation; this._Origin = quotation.Origin; this._CustomerClient = customer; this._Instrument = instrument; this._ExchangeCode = quoteMessage.ExchangeCode; this._CustomerId = quoteMessage.CustomerID; this._InstrumentId = quoteMessage.InstrumentID; this._Lot = (decimal)quoteMessage.QuoteLot; this._AnswerLot = this._Lot; this._BSStatus = (BSStatus)quoteMessage.BSStatus; this._BuyLot = this._BSStatus == BSStatus.Buy ? this._Lot : decimal.Zero; this._SellLot = this._BSStatus == BSStatus.Sell ? this._Lot : decimal.Zero; if (this._BSStatus == BSStatus.Both) { this._BuyLot = this._Lot; this._SellLot = this._Lot; } this._WaitTimes = waitTimes; this._TimeStamp = quoteMessage.TimeStamp; }
void MessageClient_QuotePriceReceived(QuoteMessage quoteMessage) { this.Dispatcher.BeginInvoke((Action<QuoteMessage>)delegate(QuoteMessage result) { //声音处理 MediaManager.PlayMedia(this._Media, MediaManager._EnquiryMediaSource); int waiteTime = 50; //取初始化数据系统参数 Guid customerId = result.CustomerID; //通过CustomerId获取Customer对象 //var customer = this._Customers.SingleOrDefault(P => P.id == customerId); var customer = new Customer(); customer.Id = result.CustomerID; customer.Code = "WF007"; QuotePriceClient quotePriceClient = new QuotePriceClient(result, waiteTime, customer); QuotePriceForInstrument clientQuotePriceForInstrument = null; clientQuotePriceForInstrument = this._ClientQuotePriceForInstrument.SingleOrDefault(P => P.InstrumentClient.Id == quotePriceClient.InstrumentId); if (clientQuotePriceForInstrument == null) { //从内存中获取Instrument //var instrumentEntity = this._Instruments.SingleOrDefault(P => P.InstrumentId == clientQuotePriceForAccount.InstrumentId); clientQuotePriceForInstrument = new QuotePriceForInstrument(); var instrument = this.GetInstrument(quotePriceClient); clientQuotePriceForInstrument.InstrumentClient = instrument; clientQuotePriceForInstrument.Origin = instrument.Origin; clientQuotePriceForInstrument.Adjust = decimal.Parse(instrument.Origin); clientQuotePriceForInstrument.AdjustLot = quotePriceClient.QuoteLot; this._ClientQuotePriceForInstrument.Add(clientQuotePriceForInstrument); } clientQuotePriceForInstrument.OnEmptyQuotePriceClient += new QuotePriceForInstrument.EmptyQuotePriceHandle(ClientQuotePriceForInstrument_OnEmptyClientQuotePriceClient); //clientQuotePriceForInstrument.OnEmptyCheckBoxClient += new QuotePriceForInstrument.EmptyCheckBoxHandle(ClientQuotePriceForInstrument_OnEmptyCheckBoxClient); clientQuotePriceForInstrument.AddNewQuotePrice(quotePriceClient); if (!this._QuoteTimer.IsEnabled) { this._QuoteTimer.Start(); } }, quoteMessage); }
internal void MessageClient_QuotePriceReceived(QuoteMessage quoteMessage) { App.MainWindow.Dispatcher.BeginInvoke((Action)delegate() { MediaManager.PlayMedia(this._MediaElement, MediaManager._EnquiryMediaSource); this.InitDataManager.ProcessQuoteMessage(quoteMessage); }); }
private static Message Convert(string exchagenCode, QuoteCommand quoteCommand) { QuoteMessage quoteMessage = new QuoteMessage(exchagenCode, quoteCommand.CustomerID, quoteCommand.InstrumentID, quoteCommand.QuoteLot, quoteCommand.BSStatus); return quoteMessage; }
private void MessageClient_QuotePriceReceived(QuoteMessage quoteMessage) { this.Dispatcher.BeginInvoke((Action)delegate() { this.WindowState = Infragistics.Controls.Interactions.WindowState.Normal; this.Height = 650; this.Width = 650; if (!this.isBingdingGrid) { this.BindGridData(); this.isBingdingGrid = true; } if (!this._QuoteTimer.IsEnabled) { this._QuoteTimer.Start(); } }); }
private void Process(QuoteMessage quoteMessage) { this._ExchangeDataManager.ProcessQuoteMessage(quoteMessage); }