Пример #1
0
 public ExportSelectedQuantitiesPresenter(IExportSelectedQuantitiesView view, IQuantitySelectionPresenter quantitySelectionPresenter, IDialogCreator dialogCreator) : base(view)
 {
     _quantitySelectionPresenter = quantitySelectionPresenter;
     _dialogCreator = dialogCreator;
     AddSubPresenters(_quantitySelectionPresenter);
     View.AddSelectionView(_quantitySelectionPresenter.BaseView);
     _quantitySelectionPresenter.Description = AppConstants.Captions.ExportSelectedObservedDataDescription;
     _exportQuantitiesSelectionDTO           = new ExportQuantitiesSelectionDTO();
     _view.BindTo(_exportQuantitiesSelectionDTO);
     ViewChanged();
 }
 public OutputSelectionsPresenter(IOutputSelectionsView view, IQuantitySelectionPresenter quantitySelectionPresenter,
                                  ISimulationPersistableUpdater simulationPersistableUpdater)
     : base(view)
 {
     _quantitySelectionPresenter   = quantitySelectionPresenter;
     _simulationPersistableUpdater = simulationPersistableUpdater;
     _quantitySelectionPresenter.AutomaticallyHideEmptyColumns = true;
     _quantitySelectionPresenter.StatusChanged += (o, e) => refreshView();
     _view.AddSettingsView(_quantitySelectionPresenter.BaseView);
     _quantitySelectionPresenter.Description = AppConstants.Captions.SimulationSettingsDescription.FormatForDescription();
     AddSubPresenters(_quantitySelectionPresenter);
 }
Пример #3
0
 protected SimulationOutputSelectionPresenter(TView view, IQuantitySelectionPresenter quantitySelectionPresenter,
    ISimulationPersistableUpdater simulationPersistableUpdater, IPKSimProjectRetriever projectRetriever, IDialogCreator dialogCreator, ICoreUserSettings userSettings)
    : base(view)
 {
    _quantitySelectionPresenter = quantitySelectionPresenter;
    _simulationPersistableUpdater = simulationPersistableUpdater;
    _projectRetriever = projectRetriever;
    _dialogCreator = dialogCreator;
    _userSettings = userSettings;
    _quantitySelectionPresenter.StatusChanged += quantitySelectionChanged;
    _view.AddSettingsView(_quantitySelectionPresenter.BaseView);
    _quantitySelectionPresenter.ExpandAllGroups = false;
 }
        protected override void Context()
        {
            _view = A.Fake <IPopulationSimulationSettingsView>();
            _quantitySelectionPresenter   = A.Fake <IQuantitySelectionPresenter>();
            _simulationPersistableUpdater = A.Fake <ISimulationPersistableUpdater>();
            _projectRetriever             = A.Fake <IProjectRetriever>();
            _dialogCreator = A.Fake <IDialogCreator>();
            _userSettings  = A.Fake <IUserSettings>();

            _populationSimulation = A.Fake <PopulationSimulation>();
            A.CallTo(() => _populationSimulation.NumberOfItems).Returns(10);
            _populationSimulation.Model = new Model {
                Root = new Container()
            };
            _originalSettings = A.Fake <OutputSelections>();
            _editedSettings   = A.Fake <OutputSelections>();
            A.CallTo(() => _originalSettings.Clone()).Returns(_editedSettings);
            A.CallTo(() => _populationSimulation.OutputSelections).Returns(_originalSettings);
            _selectedQuantities = new List <QuantitySelection>();
            A.CallTo(() => _quantitySelectionPresenter.SelectedQuantities()).Returns(_selectedQuantities);
            sut = new PopulationSimulationSettingsPresenter(_view, _quantitySelectionPresenter, _simulationPersistableUpdater, _projectRetriever, _dialogCreator, _userSettings);
        }
Пример #5
0
 public QuantitySelectionForm(IQuantitySelectionPresenter presenter)
 {
     _presenter = presenter;
     InitializeComponent();
     panelControl1.FillWith(presenter.View);
 }
Пример #6
0
 public void AttachPresenter(IQuantitySelectionPresenter presenter)
 {
     _presenter = presenter;
 }
Пример #7
0
 public PopulationSimulationSettingsPresenter(IPopulationSimulationSettingsView view, IQuantitySelectionPresenter quantitySelectionPresenter, ISimulationPersistableUpdater simulationPersistableUpdater, IPKSimProjectRetriever projectRetriever, IDialogCreator dialogCreator, IUserSettings userSettings)
     : base(view, quantitySelectionPresenter, simulationPersistableUpdater, projectRetriever, dialogCreator, userSettings)
 {
 }