Ejemplo n.º 1
0
 public EditParametersInContainerPresenter(IEditParametersInContainerView view,
                                           IFormulaToFormulaBuilderDTOMapper formulaMapper,
                                           IParameterToParameterDTOMapper parameterToDTOParameterMapper,
                                           IInteractionTasksForParameter parameterTask,
                                           IEditDistributedParameterPresenter editDistributedParameterPresenter,
                                           IEditParameterPresenter editParameterPresenter,
                                           IQuantityTask quantityTask,
                                           IInteractionTaskContext interactionTaskContext,
                                           IClipboardManager clipboardManager,
                                           IEditTaskFor <IParameter> editTask,
                                           ISelectReferencePresenterFactory selectReferencePresenterFactory,
                                           IFavoriteTask favoriteTask)
     : base(view, quantityTask, interactionTaskContext, formulaMapper, parameterTask, favoriteTask)
 {
     _clipboardManager = clipboardManager;
     _editTask         = editTask;
     _selectReferencePresenterFactory   = selectReferencePresenterFactory;
     _editDistributedParameterPresenter = editDistributedParameterPresenter;
     _editParameterPresenter            = editParameterPresenter;
     EditMode = EditParameterMode.All;
     _parameterToDTOParameterMapper     = parameterToDTOParameterMapper;
     _editParameterPresenter            = editParameterPresenter;
     _editDistributedParameterPresenter = editDistributedParameterPresenter;
     AddSubPresenters(_editDistributedParameterPresenter, _editParameterPresenter);
     _getParametersFunc        = x => x.GetChildrenSortedByName <IParameter>();
     ChangeLocalisationAllowed = true;
 }
Ejemplo n.º 2
0
 public EditOutputSchemaPresenter(IEditOutputSchemaView view, IOutputIntervalToOutputIntervalDTOMapper intervalMapper,
                                  IQuantityTask quantityTask, IOutputSchemaTask outputSchemaTask)
     : base(view)
 {
     _intervalMapper   = intervalMapper;
     _quantityTask     = quantityTask;
     _outputSchemaTask = outputSchemaTask;
 }
 protected override void Context()
 {
     _view         = A.Fake <IImportQuantityView>();
     _moBiContext  = A.Fake <IMoBiContext>();
     _mapper       = A.Fake <IDataTableToImportQuantityDTOMapperForSimulations>();
     _quantityTask = A.Fake <IQuantityTask>();
     sut           = new ImportQuantitiesForSimulationPresenter(_view, A.Fake <IDialogCreator>(), A.Fake <IImportFromExcelTask>(), _mapper, _quantityTask, _moBiContext);
 }
 protected override void Context()
 {
     _context          = A.Fake <IInteractionTaskContext>();
     _editTasks        = A.Fake <IEditTaskFor <IParameter> >();
     _dimensionFactory = A.Fake <IMoBiDimensionFactory>();
     _formulaTask      = A.Fake <IMoBiFormulaTask>();
     _quantityTask     = A.Fake <IQuantityTask>();
     sut = new InteractionTasksForParameter(_context, _editTasks, _dimensionFactory, _formulaTask, _quantityTask);
 }
Ejemplo n.º 5
0
 protected AbstractParameterBasePresenter(TView view, IQuantityTask quantityTask,
                                          IInteractionTaskContext interactionTaskContext, IFormulaToFormulaBuilderDTOMapper formulaMapper,
                                          IInteractionTasksForParameter parameterTask, IFavoriteTask favoriteTask) : base(view)
 {
     _quantityTask           = quantityTask;
     _interactionTaskContext = interactionTaskContext;
     _formulaMapper          = formulaMapper;
     _parameterTask          = parameterTask;
     _favoriteTask           = favoriteTask;
 }
Ejemplo n.º 6
0
 public CreatePKSimMoleculePresenter(ICreatePKSimMoleculeView view, IMoBiConfiguration configuration,
                                     IParameterToParameterDTOMapper parameterDTOMapper, IMoleculeBuilderToMoleculeBuilderDTOMapper moleculeBuilderDTOMapper,
                                     ISerializationTask serializationTask, IQuantityTask quantityTask, IEditTaskFor <IMoleculeBuilder> editTask) : base(view)
 {
     _configuration            = configuration;
     _parameterDTOMapper       = parameterDTOMapper;
     _moleculeBuilderDTOMapper = moleculeBuilderDTOMapper;
     _serializationTask        = serializationTask;
     _quantityTask             = quantityTask;
     _editTask = editTask;
 }
Ejemplo n.º 7
0
 public InteractionTasksForParameter(
     IInteractionTaskContext interactionTaskContext,
     IEditTaskFor <IParameter> editTasks,
     IMoBiDimensionFactory dimensionFactory,
     IMoBiFormulaTask formulaTask,
     IQuantityTask quantityTask) :
     base(interactionTaskContext, editTasks)
 {
     _dimensionFactory = dimensionFactory;
     _formulaTask      = formulaTask;
     _quantityTask     = quantityTask;
 }
Ejemplo n.º 8
0
 public EditQuantityInSimulationPresenter(IEditQuantityInSimulationView view, IQuantityToQuantityDTOMapper quantityToQuantityDTOMapper,
                                          IFormulaPresenterCache formulaPresenterCache, IEditParametersInContainerPresenter parameterPresenter, IQuantityTask quantityTask, IReactionDimensionRetriever reactionDimensionRetriever)
     : base(view)
 {
     _quantityTask                = quantityTask;
     _parameterPresenter          = parameterPresenter;
     _parameterPresenter.EditMode = EditParameterMode.ValuesOnly;
     _quantityToQuantityDTOMapper = quantityToQuantityDTOMapper;
     _formulaPresenterCache       = formulaPresenterCache;
     _view.SetInitialValueLabel   = initialValueLabel(reactionDimensionRetriever.SelectedDimensionMode);
     AddSubPresenters(_parameterPresenter);
 }
        protected override void Context()
        {
            _view                  = A.Fake <ICreatePKSimMoleculeView>();
            _configuration         = A.Fake <IMoBiConfiguration>();
            _parameterDTOMapper    = A.Fake <IParameterToParameterDTOMapper>();
            _moleculeBuilderMapper = A.Fake <IMoleculeBuilderToMoleculeBuilderDTOMapper>();
            _quantityTask          = A.Fake <IQuantityTask>();
            _serializationTask     = A.Fake <ISerializationTask>();
            _moleculeBuildingBlock = A.Fake <IMoleculeBuildingBlock>();
            _editTask              = A.Fake <IEditTaskFor <IMoleculeBuilder> >();

            sut = new CreatePKSimMoleculePresenter(_view, _configuration, _parameterDTOMapper, _moleculeBuilderMapper, _serializationTask, _quantityTask, _editTask);
        }
Ejemplo n.º 10
0
 public ImportQuantitiesForSimulationPresenter(
     IImportQuantityView view,
     IDialogCreator dialogCreator,
     IImportFromExcelTask excelTask,
     IDataTableToImportQuantityDTOMapperForSimulations mapper,
     IQuantityTask quantityTask,
     IMoBiContext context)
     : base(view, dialogCreator, excelTask)
 {
     _quantityTask = quantityTask;
     _mapper       = mapper;
     _context      = context;
 }
        protected override void Context()
        {
            _view                       = A.Fake <IEditQuantityInSimulationView>();
            _mapper                     = A.Fake <IQuantityToQuantityDTOMapper>();
            _presenterCache             = A.Fake <IFormulaPresenterCache>();
            _parametrPresenters         = A.Fake <IEditParametersInContainerPresenter>();
            _quantityTask               = A.Fake <IQuantityTask>();
            _reactionDimensionRetriever = A.Fake <IReactionDimensionRetriever>();

            sut            = new EditQuantityInSimulationPresenter(_view, _mapper, _presenterCache, _parametrPresenters, _quantityTask, _reactionDimensionRetriever);
            sut.Simulation = A.Fake <IMoBiSimulation>();
            sut.InitializeWith(A.Fake <ICommandCollector>());
        }
 public EditParameterListPresenter(
     IEditParameterListView view,
     IQuantityTask quantityTask,
     IInteractionTaskContext interactionTaskContext,
     IFormulaToFormulaBuilderDTOMapper formulaMapper,
     IInteractionTasksForParameter parameterTask,
     IFavoriteTask favoriteTask,
     IViewItemContextMenuFactory viewItemContextMenuFactory,
     IParameterToParameterDTOMapper parameterDTOMapper) :
     base(view, quantityTask, interactionTaskContext, formulaMapper, parameterTask, favoriteTask)
 {
     _viewItemContextMenuFactory = viewItemContextMenuFactory;
     _parameterDTOMapper         = parameterDTOMapper;
 }
 public EditDistributedParameterPresenter(IEditDistributedParameterView view, IEditTaskFor <IParameter> editTasks,
                                          IMoBiContext context, IDistributedParameterToDistributedParameterDTOMapper distributedParameterMapper,
                                          IDistributionFormulaFactory distributionFormulaFactory, IQuantityTask quantityTask, IFormulaToFormulaBuilderDTOMapper formulaMapper,
                                          IMoBiFormulaTask formulaTask, IParameterFactory parameterFactory, IInteractionTasksForParameter parameterTask) : base(view)
 {
     _editTasks = editTasks;
     _distributionFormulaFactory = distributionFormulaFactory;
     _quantityTask               = quantityTask;
     _formulaMapper              = formulaMapper;
     _formulaTask                = formulaTask;
     _parameterFactory           = parameterFactory;
     _parameterTask              = parameterTask;
     _distributedParameterMapper = distributedParameterMapper;
     _context = context;
 }
Ejemplo n.º 14
0
 public MoBiFormulaTask(
     IMoBiContext context,
     IMoBiApplicationController applicationController,
     IFormulaTask formulaTask,
     INameCorrector nameCorrector,
     IDialogCreator dialogCreator,
     IQuantityTask quantityTask,
     IEntitiesInBuildingBlockRetriever <IParameter> parameterInBuildingBlockRetriever)
 {
     _context = context;
     _applicationController             = applicationController;
     _formulaTask                       = formulaTask;
     _nameCorrector                     = nameCorrector;
     _dialogCreator                     = dialogCreator;
     _quantityTask                      = quantityTask;
     _parameterInBuildingBlockRetriever = parameterInBuildingBlockRetriever;
 }
Ejemplo n.º 15
0
        protected override void Context()
        {
            _withFormulaDecoder = new UsingFormulaDecoder();
            _buildingBlock      = A.Fake <IBuildingBlock>();
            A.CallTo(() => _buildingBlock.FormulaCache).Returns(new FormulaCache());
            _context               = A.Fake <IMoBiContext>();
            _dialogCreator         = A.Fake <IDialogCreator>();
            _applicationController = A.Fake <IMoBiApplicationController>();
            _formulaTask           = A.Fake <IFormulaTask>();
            _nameCorrector         = A.Fake <INameCorrector>();
            _quantityTask          = A.Fake <IQuantityTask>();
            _parametersInBuildingBlockRetriever = A.Fake <IEntitiesInBuildingBlockRetriever <IParameter> >();

            sut = new MoBiFormulaTask(_context, _applicationController, _formulaTask, _nameCorrector, _dialogCreator, _quantityTask, _parametersInBuildingBlockRetriever);

            _usingFormulaObject         = A.Fake <IUsingFormula>();
            _usingFormulaObject.Formula = MvExplicitFormula();
        }
Ejemplo n.º 16
0
        protected override void Context()
        {
            _commandCollector           = A.Fake <ICommandCollector>();
            _view                       = A.Fake <IEditDistributedParameterView>();
            _editTask                   = A.Fake <IEditTaskFor <IParameter> >();
            _context                    = A.Fake <IMoBiContext>();
            _distributedParameterMapper = A.Fake <IDistributedParameterToDistributedParameterDTOMapper>();
            _distributionFormulaFactory = A.Fake <IDistributionFormulaFactory>();
            _quantityTask               = A.Fake <IQuantityTask>();
            _formulaMapper              = A.Fake <IFormulaToFormulaBuilderDTOMapper>();
            _formulaTask                = A.Fake <IMoBiFormulaTask>();
            _parameterFactory           = A.Fake <IParameterFactory>();
            _parameterTask              = A.Fake <IInteractionTasksForParameter>();

            sut = new EditDistributedParameterPresenter(_view, _editTask, _context, _distributedParameterMapper, _distributionFormulaFactory, _quantityTask, _formulaMapper,
                                                        _formulaTask, _parameterFactory, _parameterTask);

            sut.InitializeWith(_commandCollector);
        }
Ejemplo n.º 17
0
 protected override void Context()
 {
     _view            = A.Fake <IEditParametersInContainerView>();
     _formulaMapper   = A.Fake <IFormulaToFormulaBuilderDTOMapper>();
     _parameterMapper = A.Fake <IParameterToParameterDTOMapper>();
     _inteactionTasks = A.Fake <IInteractionTasksForParameter>();
     _distributeParameterPresenter = A.Fake <IEditDistributedParameterPresenter>();
     _parameterPresenter           = A.Fake <IEditParameterPresenter>();
     _parameter                 = new Parameter().WithId("P").WithName("P");
     _parameter.Visible         = true;
     _advancedParameter         = new Parameter().WithId("AP").WithName("AP");
     _quantityTask              = A.Fake <IQuantityTask>();
     _clipboardManager          = A.Fake <IClipboardManager>();
     _advancedParameter.Visible = false;
     _interactionTaskContext    = A.Fake <IInteractionTaskContext>();
     _editTask = A.Fake <IEditTaskFor <IParameter> >();
     _selectReferencePresenterFactory = A.Fake <ISelectReferencePresenterFactory>();
     _favoriteTask = A.Fake <IFavoriteTask>();
     sut           = new EditParametersInContainerPresenter(_view, _formulaMapper, _parameterMapper, _inteactionTasks,
                                                            _distributeParameterPresenter, _parameterPresenter, _quantityTask, _interactionTaskContext, _clipboardManager, _editTask, _selectReferencePresenterFactory, _favoriteTask);
     sut.InitializeWith(A.Fake <ICommandCollector>());
 }
Ejemplo n.º 18
0
 public QuantityController(IQuantityTask process)
 {
     _process = process;
 }
Ejemplo n.º 19
0
 public ParameterTask(IQuantityTask quantityTask)
 {
     _quantityTask = quantityTask;
 }