public void GetContractInfo() { FutureOptionList.AddRange(ClientDbContext.GetContractFromCache((int)ProductType.PRODUCT_FUTURE)); FutureOptionList.AddRange(ClientDbContext.GetContractFromCache((int)ProductType.PRODUCT_OPTIONS)); FutureOptionList.AddRange(ClientDbContext.GetContractFromCache((int)ProductType.PRODUCT_ETFOPTION)); FutureOptionList.AddRange(ClientDbContext.GetContractFromCache((int)ProductType.PRODUCT_STOCK)); contractTextBox.Provider = new SuggestionProvider((string c) => { return(FutureOptionList.Where(ci => ci.Contract.StartsWith(c, true, null)).Select(cn => cn.Contract)); }); }
public void Initialize() { _viewSource.Source = QuoteVMCollection; quoteListView.ItemsSource = _viewSource.View; mColumns = ColumnObject.GetColumns(quoteListView); FilterSettingsWin.UserID = MarketDataHandler.MessageWrapper.User.Id; FutureOptionList.AddRange(ClientDbContext.GetContractFromCache((int)ProductType.PRODUCT_FUTURE)); FutureOptionList.AddRange(ClientDbContext.GetContractFromCache((int)ProductType.PRODUCT_OPTIONS)); QuoteChanged = _viewSource.View as ICollectionViewLiveShaping; if (QuoteChanged.CanChangeLiveFiltering) { QuoteChanged.LiveFilteringProperties.Add("Exchange"); QuoteChanged.LiveFilteringProperties.Add("Contract"); QuoteChanged.IsLiveFiltering = true; } }