public void AddAbnormalQuotation(AbnormalQuotationMessage message) { VmAbnormalQuotation abnormalQuotation = new VmAbnormalQuotation(message); lock (this._Timer) { this._AbnormalQuotations.Add(abnormalQuotation); if(this._AbnormalQuotations.Count == 1) { this.OnPropertyChanged(SR.FirstItem); } if (!this._TimerStarted) { this._Timer.Change(0, 1000); this._TimerStarted = true; } } }
public void Process(AbnormalQuotationMessage message) { VmQuotationManager.Instance.AddAbnormalQuotation(message); App.MainFrameWindow.ShowAbnormalQuotationPane(); }
public void AddAbnormalQuotation(AbnormalQuotationMessage message) { this._abnormalQuotationManager.AddAbnormalQuotation(message); }
public void StartConfirm(SourceQuotation quotation) { string format = "F" + MainService.QuotationManager.ConfigMetadata.Instruments[quotation.InstrumentId].DecimalPlace; AbnormalQuotationMessage message = new AbnormalQuotationMessage(); message.ConfirmId = quotation.ConfirmId; message.InstrumentId = quotation.InstrumentId; message.InstrumentCode = quotation.InstrumentCode; message.NewPrice = quotation.OutOfRangeType == OutOfRangeType.Ask ? quotation.Ask.ToString(format) : quotation.Bid.ToString(format); message.OldPrice = quotation.OldPrice; message.OutOfRangeType = quotation.OutOfRangeType; message.DiffPoints = quotation.DiffPoints; message.WaitSeconds = quotation.WaitSeconds; MainService.ClientManager.Dispatch(message); quotation.WaitEndTime = DateTime.Now.AddSeconds(quotation.WaitSeconds + 1); // Add one sencond at server side. this.ChangeWaitTime(quotation.WaitEndTime); }
public VmAbnormalQuotation(AbnormalQuotationMessage abnormalQuotationMessage) { this._AbnormalQuotationMessage = abnormalQuotationMessage; this._RemainingSeconds = abnormalQuotationMessage.WaitSeconds; }
private void Process(AbnormalQuotationMessage abnormalQuotationMessage) { this._QuotationMessageProcessor.Process(abnormalQuotationMessage); App.MainFrameWindow.ExchangeDataManager.PlaySound(SoundOption.OutOfRange); }