Exemple #1
0
 public ReactionsListSubPresenter(IReactionListView view, IReactionBuilderToReactionInfoDTOMapper reactionBuilderBuilderToDtoReactionInfoMapper, IViewItemContextMenuFactory viewItemContextMenuFactory, IMoBiContext context) : base(view)
 {
     _reactionBuilderBuilderToDtoReactionInfoMapper = reactionBuilderBuilderToDtoReactionInfoMapper;
     _context = context;
     _viewItemContextMenuFactory = viewItemContextMenuFactory;
 }
 protected override void Context()
 {
     _context = A.Fake <IMoBiContext>();
     sut      = new MoleculeListTasks(_context);
 }
 protected ObserverBuilderListPresenterBase(IObserverListView view, IFormulaToFormulaBuilderDTOMapper formulaToDTOFormulaMapper,
                                            IMoBiDimensionFactory dimensionFactory, IViewItemContextMenuFactory viewItemContextMenuFactory, IMoBiContext context) : base(view)
 {
     _context = context;
     _viewItemContextMenuFactory = viewItemContextMenuFactory;
     _formulaToDTOFormulaMapper  = formulaToDTOFormulaMapper;
     _dimensionFactory           = dimensionFactory;
 }
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new EditParameterRHSFormulaInBuildingBlockCommand(_oldValue, _newValue, _parameter, _buildingBlock).AsInverseFor(this));
 }
 public override void RestoreExecutionData(IMoBiContext context)
 {
     base.RestoreExecutionData(context);
     _formula             = context.Get <IFormula>(_formulaId);
     _formulaPathToUpdate = _formula.FormulaUsablePathBy(_alias);
 }
Exemple #6
0
 public ContextMenuForSimulation(IMoBiContext context)
 {
     _context = context;
 }
 protected override void ExecuteWith(IMoBiContext context)
 {
     base.ExecuteWith(context);
     _parameter.RHSFormula = _newValue;
 }
Exemple #8
0
 public override void RestoreExecutionData(IMoBiContext context)
 {
     base.RestoreExecutionData(context);
     _tableFormula = context.Get <TableFormula>(_tableFormulaId);
     _valuePoint   = _tableFormula.GetPointWithCoordinates(_x, _y);
 }
Exemple #9
0
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new SetRestartSolverInValuePointCommand(_tableFormula, _valuePoint, _oldRestartSolverValue, _buildingBlock).AsInverseFor(this));
 }
Exemple #10
0
 protected AssignmentImporterBase(IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory, ASTHandler astHandler, IMoBiContext context) : base(objectPathFactory, objectBaseFactory, astHandler, context)
 {
 }
Exemple #11
0
 protected override void ExecuteWith(IMoBiContext context)
 {
     base.ExecuteWith(context);
     _valuePoint.RestartSolver = _newRestartSolverValue;
     context.PublishEvent(new TableFormulaRestartSolverChangedEvent(_tableFormula, _valuePoint));
 }
Exemple #12
0
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new ChangePathElementAtContainerPathCommand(_oldElement, _applicationMoleculeBuilder, _newElement, _buildingBlock)
            .AsInverseFor(this));
 }
Exemple #13
0
 protected override void ExecuteWith(IMoBiContext context)
 {
     base.ExecuteWith(context);
     _applicationMoleculeBuilder.RelativeContainerPath.Replace(_oldElement, _newElement);
 }
Exemple #14
0
 protected override IReversibleCommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new RemoveNotMatchTagConditionCommand <T>(_tag, _taggedObject, _buildingBlock, _descriptorCriteriaRetriever).AsInverseFor(this));
 }
Exemple #15
0
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new SetQuantityDimensionCommand(_quantity, _oldDimension, _buildingBlock).AsInverseFor(this));
 }
 protected override IReversibleCommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     //inverse of a reset command set the previous value back into the quantity
     return(new SetQuantityValueInSimulationCommand(_quantity, _oldValue, _simulation).AsInverseFor(this));
 }
Exemple #17
0
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new SetDistributedParameterDimensionCommand(distributedParameter, _oldDimension, _buildingBlock).AsInverseFor(this));
 }
 protected override IReversibleCommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new AddChartTemplateToSimulationSettingsCommand(_chartTemplate, _simulation).AsInverseFor(this));
 }
Exemple #19
0
 public ContextMenuSpecificationFactoryForSimulation(IMoBiContext context)
 {
     _context = context;
 }
 public override void RestoreExecutionData(IMoBiContext context)
 {
     base.RestoreExecutionData(context);
     _chartTemplate = context.Deserialize <CurveChartTemplate>(_serializationStream);
 }
 public override void RestoreExecutionData(IMoBiContext context)
 {
     base.RestoreExecutionData(context);
     _newValue = context.Get <IFormula>(_newFormulaId);
     _oldValue = context.Get <IFormula>(_oldFormulaId);
 }
 protected override void DoExecute(IMoBiContext context)
 {
     _simulation.RemoveChartTemplate(_chartTemplate.Name);
     _serializationStream = context.Serialize(_chartTemplate);
     Description          = AppConstants.Commands.RemoveChartTemplateFromSimulation(_chartTemplate.Name, _simulation.Name);
 }
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new EditPathAtUsablePathCommand(_formula, _oldObjectPath, _formulaPathToUpdate, _buildingBlock).AsInverseFor(this));
 }
 protected ReactionPartnerPresenter(IReactionBuilderView <TReactionPartnerBuilder> view, IMoBiContext context, IViewItemContextMenuFactory viewItemContextMenuFactory, IInteractionTasksForReactionBuilder reactionBuilderTask) : base(view)
 {
     _context = context;
     _viewItemContextMenuFactory = viewItemContextMenuFactory;
     _reactionBuilderTask        = reactionBuilderTask;
 }
Exemple #25
0
 protected override ICommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(new SetTableFormulaXDisplayUnitCommand(_oldDisplayUnit, _newDisplayUnit, _tableFormula, _buildingBlock).AsInverseFor(this));
 }
Exemple #26
0
 public ObserverBuildingBlockMergeManager(IApplicationController applicationController, IObserverBuilderToObjectBaseSummaryDTOMapper dtoMapper, IMoBiContext context)
     : base(applicationController, dtoMapper, context)
 {
 }
 public ContainerObserverBuilderListPresenter(IObserverListView view, IFormulaToFormulaBuilderDTOMapper formulaToDTOFormulaMapper, IMoBiDimensionFactory dimensionFactory, IObserverBuilderToDTOObserverBuilderMapper containerObserverBuilderToDTOContainerObserverBuilderMapper, IViewItemContextMenuFactory viewItemContextMenuFactory, IMoBiContext context)
     : base(view, formulaToDTOFormulaMapper, dimensionFactory, viewItemContextMenuFactory, context)
 {
     _containerObserverBuilderToDTOContainerObserverBuilderMapper = containerObserverBuilderToDTOContainerObserverBuilderMapper;
 }
Exemple #28
0
 public TagTask(IMoBiContext context)
 {
     _context = context;
 }
Exemple #29
0
 public ObjectPathCreatorAtObserver(IObjectPathFactory objectPathFactory, IAliasCreator aliasCreator, IMoBiContext context) : base(objectPathFactory, aliasCreator, context)
 {
 }
 protected override void Context()
 {
     base.Context();
     _context = A.Fake <IMoBiContext>();
 }