protected ConfigureSimulationPresenterBase(TView view, ISubPresenterItemManager <ISimulationItemPresenter> subPresenterManager, IDialogCreator dialogCreator, IBuildConfigurationFactory buildConfigurationFactory, IMoBiContext context, IReadOnlyList <ISubPresenterItem> subPresenterItems) : base(view, subPresenterManager, subPresenterItems, dialogCreator) { _buildConfigurationFactory = buildConfigurationFactory; _context = context; _commands = new MoBiMacroCommand(); InitializeWith(_commands); AllowQuickFinish = true; }
public CalculateScaleDivisorsPresenter(ICalculateScaleDivisorsView view, ICommandTask commandTask, IContainerTask containerTask, IScaleDivisorCalculator scaleDivisorCalculator, IMoleculeAmountTask moleculeAmountTask, IMoBiContext context) : base(view) { _commandTask = commandTask; _containerTask = containerTask; _scaleDivisorCalculator = scaleDivisorCalculator; _moleculeAmountTask = moleculeAmountTask; _context = context; _commands = new MoBiMacroCommand { CommandType = AppConstants.Commands.EditCommand, ObjectType = ObjectTypes.Simulation }; }
public bool AdjustFormula <T>(T objectBase, IBuildingBlock buildingBlockWithFormulaCache, IMoBiMacroCommand macroCommand) where T : IObjectBase { var formulaCommands = _adjustFormulasVisitor.AdjustFormulasIn(objectBase, buildingBlockWithFormulaCache); if (!_adjustFormulasVisitor.Canceled) { macroCommand.AddRange(formulaCommands); } return(!_adjustFormulasVisitor.Canceled); }
public void AddToParent(IObserverBuilder builder, IBuildingBlock buildingBlockWithFormulaCache, IMoBiMacroCommand macroCommand, Func <IObserverBuilder, IMoBiCommand> getAddCommand) { if (builder.IsAnImplementationOf <IContainerObserverBuilder>()) { _containerObserverTask.AddToParent(builder.DowncastTo <IContainerObserverBuilder>(), buildingBlockWithFormulaCache, macroCommand, getAddCommand); } else { _amountObserverBuilderTask.AddToParent(builder.DowncastTo <IAmountObserverBuilder>(), buildingBlockWithFormulaCache, macroCommand, getAddCommand); } }
protected override void Because() { _command = sut.MoveDiagramNodes(_sourceBuildingBlock, _targetBuildingBlock, _sourceReaction, _sourceReaction.Name) as IMoBiMacroCommand; }
public void AddToParent(TBuilder builder, IBuildingBlock buildingBlockWithFormulaCache, IMoBiMacroCommand macroCommand, Func <TBuilder, IMoBiCommand> getAddCommand) { AddToProject(builder, buildingBlockWithFormulaCache.DowncastTo <TBuildingBlock>(), buildingBlockWithFormulaCache); }