예제 #1
0
 void _client_ContractDetailsEnd(object sender, ContractDetailsEndEventArgs e)
 {
     SearchUnderway = false; //re-enables the search commands
     Status = Instruments.Count + " contracts arrived";
 }
 private void _client_ContractDetailsEnd(object sender, ContractDetailsEndEventArgs e)
 {
     Dispatcher.Invoke(() => StatusLabel.Content = Instruments.Count + " contracts arrived");
 }
예제 #3
0
        private void _client_BatchContractDetailsEnd(object sender, ContractDetailsEndEventArgs e)
        {
            if (_tmpContractDetails.Count == 1)
            {
                var im = new InstrumentManager();
                Instrument instrument = ContractToInstrument(_tmpContractDetails[0]);

                if (instrument != null && TryAddInstrument(im, instrument))
                {
                    //successfully added the symbol
                    _symbolsAdded.Add(instrument.Symbol);
                }
            }

            _tmpContractDetails.Clear();

            if (_queuedSymbols.Count == 0)
            {
                //in this case, we have completed all the requests
                BatchRequestJobCompleted();
            }
            else
            {
                //we're not done, send the next request
                SendNextRequestInBatch();
            }
        }