Exemplo n.º 1
0
        protected StartValuePresenter(
            TView view,
            IStartValueToStartValueDTOMapper <TStartValue, TStartValueDTO> startValueMapper,
            IRefreshStartValueFromOriginalBuildingBlockPresenter refreshStartValuesPresenter,
            IStartValuesTask <TBuildingBlock, TStartValue> startValuesTask,
            IEmptyStartValueCreator <TStartValue> emptyStartValueCreator,
            IMoBiContext context,
            ILegendPresenter legendPresenter,
            IDeleteStartValuePresenter deleteStartValuePresenter)
            : base(view)
        {
            _startValuesTask         = startValuesTask;
            _startValueMapper        = startValueMapper;
            BackgroundColorRetriever = retrieveBackgroundColor;
            IsOriginalStartValue     = isOriginalStartValue;
            _emptyStartValueCreator  = emptyStartValueCreator;
            _context             = context;
            _legendPresenter     = legendPresenter;
            _originalStartValues = new List <TStartValue>();

            refreshStartValuesPresenter.ApplySelectionAction = performRefreshAction;
            deleteStartValuePresenter.ApplySelectionAction   = performDeleteAction;
            _view.AddRefreshStartValuesView(refreshStartValuesPresenter.BaseView);
            _view.AddDeleteStartValuesView(deleteStartValuePresenter.BaseView);

            AddSubPresenters(legendPresenter, deleteStartValuePresenter, refreshStartValuesPresenter);
            _handleChangedEvents = true;
            CanCreateNewFormula  = true;

            initializeLegend();
        }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
0
 protected AbstractStartValueSubjectRetrieverUICommand(IStartValuesTask <T, TStartValue> startValueTasks, IActiveSubjectRetriever activeSubjectRetriever) : base(activeSubjectRetriever)
 {
     _startValueTasks        = startValueTasks;
     _activeSubjectRetriever = activeSubjectRetriever;
 }
 protected AbstractQuantitiesImporterPresenterForBuildingBlock(IImportQuantityView view, IDialogCreator dialogCreator, IMoBiContext context, IImportFromExcelTask excelTask, IStartValuesTask <T, TStartValue> startValuesTask)
     : base(view, dialogCreator, excelTask)
 {
     _context         = context;
     _startValuesTask = startValuesTask;
 }