public override void Build(CompoundProperties compoundProperties, OSPSuiteTracker buildTracker) { var objectsToReport = new List <object>(); var compoundConfig = new TablePart(PKSimConstants.UI.Parameter, PKSimConstants.UI.AlternativeInCompound, PKSimConstants.UI.Value, PKSimConstants.UI.Unit) { Caption = PKSimConstants.UI.CompoundConfiguration }; compoundConfig.Types[PKSimConstants.UI.Value] = typeof(double); var compound = compoundProperties.Compound; foreach (var alternativeSelection in compoundProperties.CompoundGroupSelections) { var parameterName = _representationInfoRepository.DisplayNameFor(RepresentationObjectType.GROUP, alternativeSelection.GroupName); var parameter = getParameterForAlternative(compound, compoundProperties, alternativeSelection); compoundConfig.AddIs(parameterName, alternativeSelection.AlternativeName, ParameterMessages.DisplayValueFor(parameter, numericalDisplayOnly: true), ParameterMessages.DisplayUnitFor(parameter)); } objectsToReport.Add(buildTracker.CreateRelativeStructureElement(PKSimConstants.UI.CompoundConfiguration, 2)); objectsToReport.Add(compoundConfig); objectsToReport.Add(compoundProperties.AllCalculationMethods().Where(cm => cm.Category.IsOneOf(CoreConstants.Category.DistributionCellular, CoreConstants.Category.DistributionInterstitial, CoreConstants.Category.DiffusionIntCell))); _builderRepository.Report(objectsToReport, buildTracker); }
public void AddIs(IParameter parameter, IRepresentationInfoRepository representationInfoRepository) { AddIs(representationInfoRepository.DisplayNameFor(parameter), ParameterMessages.DisplayValueFor(parameter, numericalDisplayOnly: true), ParameterMessages.DisplayUnitFor(parameter)); }