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

            viewModel.display = "";
            foreach (string parameterName in AnalyzedDataInformation.parameterIndexForScore.Keys)
            {
                Core.parameterFuturePriceTableManager.resetParameterFuturePriceTable(parameterName);
            }
            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 = $"[Append Parameter Future Price, ID = {ID}]   ({++count}/{all})\r\n";
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setFuturePriceData(Core.futurePriceDataManager.getFuturePriceData(ID));

                var allDataToAppend = new Dictionary <string, List <ParameterFuturePriceTableInformation> >();
                dataAnalyzer.getParameterFuturePriceTableDataToAppend(allDataToAppend);

                foreach (var dataPair in allDataToAppend)
                {
                    string parameterName = dataPair.Key;
                    List <ParameterFuturePriceTableInformation> dataToAppend = dataPair.Value;
                    Core.parameterFuturePriceTableManager.appendParameterFuturePrice(parameterName, dataToAppend);
                }

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