public PopulationAnalysisOutputSelectionPresenter(
     IPopulationAnalysisOutputSelectionView view,
     IQuantityListPresenter allOutputsPresenter,
     IPopulationAnalysisOutputFieldsPresenter selectedOutputsPresenter,
     IPopulationAnalysisStatisticsSelectionPresenter statisticsSelectionPresenter,
     IEntitiesInContainerRetriever outputsRetriever,
     IEventPublisher eventPublisher,
     IDimensionRepository dimensionRepository,
     IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper) : base(view)
 {
     _allOutputsPresenter          = allOutputsPresenter;
     _selectedOutputsPresenter     = selectedOutputsPresenter;
     _statisticsSelectionPresenter = statisticsSelectionPresenter;
     _outputsRetriever             = outputsRetriever;
     _eventPublisher            = eventPublisher;
     _quantityDisplayPathMapper = quantityDisplayPathMapper;
     _timeDimension             = dimensionRepository.Time;
     AddSubPresenters(allOutputsPresenter, _selectedOutputsPresenter, _statisticsSelectionPresenter);
     _view.AddPopulationOutputsView(_allOutputsPresenter.View);
     _view.AddSelectedOutputsView(_selectedOutputsPresenter.View);
     _view.AddStatisticsSelectionView(_statisticsSelectionPresenter.View);
     _allOutputsPresenter.QuantityDoubleClicked += (o, e) => addOutput(e.Quantity);
     _allOutputsPresenter.Hide(QuantityColumn.Selection);
     _statisticsSelectionPresenter.SelectionChanged += (o, e) => selectionChanged();
     _allOutputsPresenter.ExpandAllGroups            = true;
 }
示例#2
0
 protected override void Context()
 {
     _view = A.Fake <IPopulationAnalysisOutputSelectionView>();
     _allOutputsPresenter         = A.Fake <IQuantityListPresenter>();
     _selectedOutputsPresenter    = A.Fake <IPopulationAnalysisOutputFieldsPresenter>();
     _statisticSelectionPresenter = A.Fake <IPopulationAnalysisStatisticsSelectionPresenter>();
     _outputsRetriever            = A.Fake <IEntitiesInContainerRetriever>();
     _eventPublisher      = A.Fake <IEventPublisher>();
     _dimensionRepository = A.Fake <IDimensionRepository>();
     _timeDimension       = A.Fake <IDimension>();
     A.CallTo(() => _dimensionRepository.Time).Returns(_timeDimension);
     sut = new PopulationAnalysisOutputSelectionPresenter(_view, _allOutputsPresenter, _selectedOutputsPresenter, _statisticSelectionPresenter, _outputsRetriever, _eventPublisher, _dimensionRepository);
 }