protected void AddExistingTemplateNames(Template template, ObjectBaseDTO dto)
        {
            var allTemplates = _templateTaskQuery.AllTemplatesFor(template.DatabaseType, template.Type);

            dto.AddUsedNames(allTemplates.Select(x => x.Name));
            dto.ContainerType = PKSimConstants.UI.TemplateDatabase;
        }
        protected override ObjectBaseDTO CreateDTOFor(ParameterAlternativeGroup compoundParamGroup)
        {
            var dto = new ObjectBaseDTO();

            dto.AddUsedNames(compoundParamGroup.Children.Select(x => x.Name));
            return(dto);
        }
        public ObjectBaseDTO CreateFor <TBuildingBlock>() where TBuildingBlock : class, IPKSimBuildingBlock
        {
            var dto = new ObjectBaseDTO {
                ContainerType = PKSimConstants.ObjectTypes.Project
            };

            dto.AddUsedNames(_workspace.Project.All <TBuildingBlock>().Select(x => x.Name));
            return(dto);
        }
Exemple #4
0
        protected override ObjectBaseDTO CreateDTOFor(DataRepository objectToRename)
        {
            var dto = new ObjectBaseDTO {
                ContainerType = PKSimConstants.ObjectTypes.Project, Name = objectToRename.Name
            };

            dto.AddUsedNames(_workspace.Project.AllObservedData.Select(x => x.Name));
            return(dto);
        }
Exemple #5
0
        protected override ObjectBaseDTO CreateDTOFor(ISimulationSubject simulationSubject)
        {
            var dto = new ObjectBaseDTO {
                ContainerType = _objectTypeResolver.TypeFor(simulationSubject)
            };

            dto.AddUsedNames(simulationSubject.AllMolecules().Select(x => x.Name));
            return(dto);
        }
        protected virtual void AddExistingClassificationName(ObjectBaseDTO dto)
        {
            var project = _projectRetriever.CurrentProject;

            var allExistingNames = project.AllClassificationsByType(_classificationType)
                                   .Where(x => Equals(x.Parent, _parentClassification))
                                   .Select(x => x.Name);

            dto.AddUsedNames(allExistingNames);
        }
 private void edit(IMoBiSimulation simulation)
 {
     Simulation          = simulation;
     _buildConfiguration = simulation.MoBiBuildConfiguration;
     _simulationDTO      = new ObjectBaseDTO {
         Name = simulation.Name
     };
     _simulationDTO.AddUsedNames(nameOfSimulationAlreadyUsed());
     _subPresenterItemManager.AllSubPresenters.Each(x => x.Edit(simulation));
     _view.BindTo(_simulationDTO);
 }