protected override void Context() { _view = A.Fake <IFavoriteParametersView>(); _parameterTask = A.Fake <IParameterTask>(); _favoriteRepository = A.Fake <IFavoriteRepository>(); _multiParameterEditPresenter = A.Fake <IMultiParameterEditPresenter>(); _favoriteTask = A.Fake <IFavoriteTask>(); sut = new FavoriteParametersPresenter(_view, _multiParameterEditPresenter, _parameterTask, _favoriteRepository, _favoriteTask); _par1 = new PKSimParameter().WithName("par1"); _par2 = new PKSimParameter().WithName("par2"); _par3 = new PKSimParameter().WithName("par3"); _parameters = new List <IParameter> { _par1, _par2, _par3 }; var pathCache = new PathCache <IParameter>(A.Fake <IEntityPathResolver>()) { { "par1", _par1 }, { "par2", _par2 }, { "par3", _par3 } }; A.CallTo(() => _parameterTask.PathCacheFor(_parameters)).Returns(pathCache); _favorites = new List <string>(); A.CallTo(() => _favoriteRepository.All()).Returns(_favorites); A.CallTo(() => _multiParameterEditPresenter.Edit(A <IEnumerable <IParameter> > ._)) .Invokes(x => _allEditedParameters = x.GetArgument <IEnumerable <IParameter> >(0)); }
public void Edit(IAdvancedParameter advancedParameter) { _advancedParameter = advancedParameter; _advancedParameterDTO = _advancedParameterDTOMapper.MapFrom(_advancedParameter); _distributionParameterPresenter.Edit(_advancedParameterDTO.Parameters); _view.BindTo(_advancedParameterDTO); }
private void bindToDynamicParameters() { var allDynamicParameters = _protocolTask.AllDynamicParametersFor(_protocol); _dynamicParameterPresenter.Edit(allDynamicParameters); updateViewLayout(); }
public void Edit(IEnumerable <IParameter> parameters) { _allParameters = parameters.ToList(); _simulationExpressionsDTO = _simulationExpressionsDTOMapper.MapFrom(_allParameters); _moleculeParametersPresenter.Edit(_simulationExpressionsDTO.MoleculeParameters); _expressionParametersPresenter.Edit(_simulationExpressionsDTO.ExpressionParameters); }
public void Edit(IEnumerable <IParameter> parameters) { var allParameters = parameters.ToList(); _pathCache = _parameterTask.PathCacheFor(allParameters); _simulationExpressionsDTO = _simulationExpressionsDTOMapper.MapFrom(allParameters); _moleculeParametersPresenter.Edit(_simulationExpressionsDTO.MoleculeParameters); _view.BindTo(_simulationExpressionsDTO); }
public void EditFormulation(Formulation formulation) { Formulation = formulation; _formulationDTO = _formulationDTOMapper.MapFrom(formulation); adjustParameterVisibility(); if (Formulation.IsTable) { _view.AddParameterView(_tableFormulationPresenter.BaseView); _tableFormulationPresenter.Edit(formulation); } else { _formulationParametersPresenter.Edit(_formulationDTO.Parameters); _view.AddParameterView(_formulationParametersPresenter.View); } updatePlot(); _view.BindTo(_formulationDTO); }
public void Edit(Formulation formulation) { var allParameters = formulation.AllParameters().ToList(); var fractionOfDose = allParameters.FindByName(CoreConstants.Parameter.FRACTION_DOSE); allParameters.Remove(fractionOfDose); _formulationParametersPresenter.Edit(allParameters); _tableParameterPresenter.Edit(fractionOfDose); }
private void updateParameters() { _allFavorites.Clear(); _allFavorites.AddRange(allFavoriteParameters()); _multiParameterEditPresenter.Edit(_allFavorites); //this needs to be done after the Edit to override whatever settings was updated in the Edit method _multiParameterEditPresenter.DistributionVisible = false; _multiParameterEditPresenter.ParameterNameVisible = true; updateMoveButtonsEnableState(_allFavorites.Any()); }
public void Edit(IEnumerable <IParameter> parameters) { _allParameters = parameters.ToList(); _molWeightGroupPresenter.EditCompoundParameters(_allParameters); _compoundTypeGroupPresenter.EditCompoundParameters(_allParameters); _advancedParameterPresenter.Edit(_allParameters.Where(parameterIsAdvancedParameter)); _simpleParameterPresenter.Edit(_allParameters.Where(parameterIsSimpleParameter)); var compoundProperties = compoundPropertiesFor(_allParameters); if (compoundProperties != null) { _calculationMethodsPresenter.Edit(compoundProperties); } else { hideCalculationMethodView(); } }
public void EditHalogens(IEnumerable <IParameter> halogenParameters) { _parameterEditPresenter.Edit(halogenParameters); }
public void Edit(IEnumerable <IParameter> calculatedParameters) { _multiParameterEditPresenter.Edit(calculatedParameters); }
public void EditHalogens(IEnumerable <IParameter> compoundParameters) { _paramEditPresenter.Edit(compoundParameters.Where(isHalogens)); }
public virtual void EditCompound(Compound compound) { _parameterEditPresenter.Edit(_parameterGroupTask.ParametersIn(_groupName, compound.AllParameters())); _view.AdjustHeight(); }