コード例 #1
0
        private void CalculateParameter(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            int count = 0, all = Core.stockListManager.getStockList().Select(x => x.ID).Count();

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                string output =
                    $"[CalculateParameter ID = {ID}]  ({++count}/{all})\r\n";
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setID(ID);
                dataAnalyzer.calculateParameter();
                output += dataAnalyzer.getDisplay();

                Core.analyzedDataManager.saveAnalyzedData(ID, dataAnalyzer.getAnalyzedData());

                viewModel.display = output + "\r\n" + viewModel.display;
                refreshText();
            }
        }