From 7df39b27942c062d73b8271323625c4b4511cd23 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 16 May 2024 20:39:35 -0400 Subject: [PATCH] For SymbolCache --- ViewModels/BollingerBandViewModel.cs | 3 ++- ViewModels/MainWindowViewModel.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ViewModels/BollingerBandViewModel.cs b/ViewModels/BollingerBandViewModel.cs index be27558..515c9ca 100644 --- a/ViewModels/BollingerBandViewModel.cs +++ b/ViewModels/BollingerBandViewModel.cs @@ -341,7 +341,8 @@ namespace TradeBlotter.ViewModels BusyContent = DATA_MESSAGE; Task workerTask = Task.Factory.StartNew(() => { - if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols(); +// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols(); + if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols(); else symbols = WatchListDA.GetWatchList(selectedWatchList); }); workerTask.ContinueWith((continuation) => diff --git a/ViewModels/MainWindowViewModel.cs b/ViewModels/MainWindowViewModel.cs index 752a6ac..621f3e1 100644 --- a/ViewModels/MainWindowViewModel.cs +++ b/ViewModels/MainWindowViewModel.cs @@ -95,6 +95,7 @@ namespace TradeBlotter.ViewModels try{LocalPriceCache.GetInstance().Dispose();}catch(Exception){;} try{GBPriceCache.GetInstance().Dispose();}catch(Exception){;} try{PriceCache.GetInstance().Dispose();}catch(Exception){;} + try{SymbolCache.GetInstance().Dispose();}catch(Exception){;} base.OnDispose(); } public override SaveParameters GetSaveParameters()