コード例 #1
0
        public virtual void EditProcessesIn(Simulation simulation, CompoundProperties compoundProperties)
        {
            _simulation                  = simulation;
            _compound                    = compoundProperties.Compound;
            _compoundProperties          = compoundProperties;
            _notSelectedSystemicProcess  = new NotSelectedSystemicProcess();
            _notAvailableSystemicProcess = new NotAvailableSystemicProcess();

            _allPartialProcesses = _compound.AllProcesses <TPartialProcess>();

            var partialProcessSelection = ProcessSelectionGroup().AllPartialProcesses();

            _selectedProcesses = _partialProcessRetriever.AllFor <TMolecule, TPartialProcess>(simulation, _compound, partialProcessSelection, addDefaultPartialProcess: true);

            _allPartialProcessesDTO = MapPartialProcesses(_selectedProcesses).ToList();

            createSystemicProcessesFor(simulation);

            _view.BindToPartialProcesses(_allPartialProcessesDTO);
            _view.BindToSystemicProcesses(_allSystemicProcessesDTO);

            ValidateProcessSelection();


            //this needs to be done after binding to the processes, since binding affects the height of the view
            _view.AdjustHeight();
        }
コード例 #2
0
 private IReadOnlyList <SimulationPartialProcess> allPossibleInteractionProcessesFor(Simulation simulation, Compound compound, IReadOnlyList <IPartialProcessMapping> processSelections, bool addDefaultPartialProcess)
 {
     return(_partialProcessRetriever.AllFor <IndividualMolecule, InhibitionProcess>(simulation, compound, processSelections, addDefaultPartialProcess)
            .Union(
                _partialProcessRetriever.AllFor <IndividualMolecule, InductionProcess>(simulation, compound, processSelections, addDefaultPartialProcess)).ToList());
 }