protected override void Context()
 {
     _view = A.Fake <ISelectAndEditContainerView>();
     _editStartValuesPresenter = A.Fake <IMoleculeStartValuesPresenter>();
     _moleculeStartValuesTask  = A.Fake <IMoleculeStartValuesTask>();
     _cloneManager             = A.Fake <ICloneManagerForBuildingBlock>();
     sut = new SelectAndEditMoleculesStartValuesPresenter(_view, _moleculeStartValuesTask, _cloneManager, new ObjectTypeResolver(), _editStartValuesPresenter, A.Fake <ILegendPresenter>());
     _commandCollector = A.Fake <ICommandCollector>();
     sut.InitializeWith(_commandCollector);
 }
Beispiel #2
0
 public SelectAndEditParameterStartValuesPresenter(ISelectAndEditContainerView view, IParameterStartValuesTask parameterStartValuesTask, ICloneManagerForBuildingBlock cloneManager,
                                                   IObjectTypeResolver objectTypeResolver, IParameterStartValuesPresenter editPresenter, ILegendPresenter legendPresenter)
     : base(view, parameterStartValuesTask, cloneManager, objectTypeResolver, editPresenter, legendPresenter)
 {
     _editPresenter = editPresenter;
     View.Caption   = AppConstants.Captions.ParameterStartValues;
     View.AddEditView(editPresenter.BaseView);
     _editPresenter.BackgroundColorRetriever = displayColorFor;
     _editPresenter.IsOriginalStartValue     = isTemplate;
 }
Beispiel #3
0
 protected SelectAndEditStartValuesPresenter(
     ISelectAndEditContainerView view,
     IStartValuesTask <TBuildingBlock, TStartValue> startValuesTask,
     ICloneManagerForBuildingBlock cloneManagerForBuildingBlock,
     IObjectTypeResolver objectTypeResolver,
     IStartValuesPresenter editPresenter,
     ILegendPresenter legendPresenter) : base(view)
 {
     _editPresenter                     = editPresenter;
     _startValuesTask                   = startValuesTask;
     _objectTypeResolver                = objectTypeResolver;
     _cloneManagerForBuildingBlock      = cloneManagerForBuildingBlock;
     _editPresenter.CanCreateNewFormula = false;
     legendPresenter.AddLegendItems(new [] { new LegendItemDTO {
                                                 Description = AppConstants.Captions.AutomaticallyGeneratedValues, Color = MoBiColors.Extended
                                             } });
     View.AddLegendView(legendPresenter.View);
     AddSubPresenters(_editPresenter, legendPresenter);
 }