protected override void Context()
 {
     _view = A.Fake <IPopulationAnalysisPKParameterSelectionView>();
     _allPKParametersPresenter           = A.Fake <IPopulationAnalysisAvailablePKParametersPresenter>();
     _selectedPKParameterFieldsPresenter = A.Fake <IPopulationAnalysisPKParameterFieldsPresenter>();
     _fieldDistributionPresenter         = A.Fake <IPopulationAnalysisFieldDistributionPresenter>();
     sut = new PopulationAnalysisPKParameterSelectionPresenter(_view, _allPKParametersPresenter, _selectedPKParameterFieldsPresenter, _fieldDistributionPresenter);
 }
        public PopulationAnalysisPKParameterSelectionPresenter(IPopulationAnalysisPKParameterSelectionView view,
                                                               IPopulationAnalysisAvailablePKParametersPresenter allPKParametersPresenter, IPopulationAnalysisPKParameterFieldsPresenter selectedPKParameterFieldsPresenter,
                                                               IPopulationAnalysisFieldDistributionPresenter populationAnalysisFieldDistributionPresenter)
            : base(view, populationAnalysisFieldDistributionPresenter)
        {
            _allPKParametersPresenter           = allPKParametersPresenter;
            _selectedPKParameterFieldsPresenter = selectedPKParameterFieldsPresenter;
            _view.AddAllPKParametersView(_allPKParametersPresenter.View);
            _view.AddSelectedPKParametersView(selectedPKParameterFieldsPresenter.BaseView);
            _view.AddDistributionView(_populationAnalysisFieldDistributionPresenter.BaseView);
            _allPKParametersPresenter.QuantityPKParameterDoubleClicked += (o, e) => addPKParameter(e.QuantityPKParameter);
            _allPKParametersPresenter.PKParameterSelected            += (o, e) => drawDistributionFor(e.PKParameter, null);
            _selectedPKParameterFieldsPresenter.PKParameterSelected  += (o, e) => drawDistributionFor(e);
            _selectedPKParameterFieldsPresenter.NoFieldSelected      += (o, e) => ClearDistribution();
            _selectedPKParameterFieldsPresenter.DerivedFieldSelected += (o, e) => DrawDistributionFor(e.DerivedField);

            AddSubPresenters(_allPKParametersPresenter, _selectedPKParameterFieldsPresenter);
        }
コード例 #3
0
 public void AttachPresenter(IPopulationAnalysisAvailablePKParametersPresenter presenter)
 {
     _presenter = presenter;
 }