private void OnClassificationRequest(IDailyClassificationInput input, ParameterListPresenter statisticsPresenter, AdxInputsPresenter adxInputsPresenter, MovingAverageInputsPresenter movingAverageInputsPresenter, SeriesIndicatorPresenter seriesPresenter) { List <DailyClassification> classifications = DoAnalysis(input.GetMethod()) .ToList(); view.LoadClassifications(classifications); ClassificationStatistics statistics = GetClassificationStatistics(classifications); statisticsPresenter.LoadData(statistics.GetParameters()); LoadSeriesIndicators(adxInputsPresenter, movingAverageInputsPresenter, seriesPresenter); }
public DailyClassificationPresenter(IDailyClassificationView view) { this.view = view; AdxInputsPresenter adxInputsPresenter = new AdxInputsPresenter(view.GetAdxInputsView()); MovingAverageInputsPresenter movingAverageInputsPresenter = new MovingAverageInputsPresenter(view.GetMovingAverageInputView()); ParameterListPresenter statisticsPresenter = new ParameterListPresenter(view.GetClassificationStatisticsView()); SeriesIndicatorPresenter seriesPresenter = new SeriesIndicatorPresenter(view.GetSeriesIndicatorView()); adxInputsPresenter.DoClassificationRequest += input => OnClassificationRequest(input, statisticsPresenter, adxInputsPresenter, movingAverageInputsPresenter, seriesPresenter); movingAverageInputsPresenter.DoClassificationRequest += input => OnClassificationRequest(input, statisticsPresenter, adxInputsPresenter, movingAverageInputsPresenter, seriesPresenter); this.view.SelectedDayChanged += () => LoadSeriesIndicators(adxInputsPresenter, movingAverageInputsPresenter, seriesPresenter); }