Esempio n. 1
0
 public void InitializeFor <TBuildingBlock>() where TBuildingBlock : IPKSimBuildingBlock
 {
     _presenter = IoC.Resolve <IBuildingBlockSelectionPresenter <TBuildingBlock> >();
     _presenter.StatusChanged      += raiseBuildingBlockSelectionChanged;
     _presenter.DisplayNotification = _displayNotification;
     _presenter.AllowEmptySelection = _allowEmptySelection;
     lblDesigner.Visible            = false;
     this.FillWith(_presenter.View);
 }
Esempio n. 2
0
        private void cleanup()
        {
            if (_presenter == null)
            {
                return;
            }

            _presenter.StatusChanged -= raiseBuildingBlockSelectionChanged;
            _presenter = null;
        }
Esempio n. 3
0
        public EditBuildConfigurationPresenter(IEditBuildConfigurationView view, IMoBiApplicationController applicationController) :
            base(view)
        {
            _applicationController         = applicationController;
            _allSelectionPresenter         = new List <IBuildingBlockSelectionPresenter>();
            _selectSpatialStructure        = createSelectionPresenterFor <IMoBiSpatialStructure>(AppConstants.Captions.SpatialStructure, ApplicationIcons.SpatialStructure);
            _selectMoleculePresenter       = createSelectionPresenterFor <IMoleculeBuildingBlock>(AppConstants.Captions.Molecules, ApplicationIcons.Drug);
            _selectReactionBlock           = createSelectionPresenterFor <IMoBiReactionBuildingBlock>(AppConstants.Captions.Reactions, ApplicationIcons.Reaction);
            _selectPassiveTransport        = createSelectionPresenterFor <IPassiveTransportBuildingBlock>(AppConstants.Captions.PassiveTransports, ApplicationIcons.PassiveTransport);
            _selectObserverBlock           = createSelectionPresenterFor <IObserverBuildingBlock>(AppConstants.Captions.Observers, ApplicationIcons.Observer);
            _selectEventBlock              = createSelectionPresenterFor <IEventGroupBuildingBlock>(AppConstants.Captions.Events, ApplicationIcons.Event);
            _selectSimulationSettingsBlock = createSelectionPresenterFor <ISimulationSettings>(AppConstants.Captions.SimulationSettings, ApplicationIcons.SimulationSettings);
            _selectMoleculeStartValues     = createSelectionPresenterFor <IMoleculeStartValuesBuildingBlock>(AppConstants.Captions.MoleculeStartValues, ApplicationIcons.MoleculeStartValuesFolder, true);
            _selectParameterStartValues    = createSelectionPresenterFor <IParameterStartValuesBuildingBlock>(AppConstants.Captions.ParameterStartValues, ApplicationIcons.ParameterStartValuesFolder, true);
            _view.AddEmptyPlaceHolder();

            _selectMoleculeStartValues.SelectionChanged  += () => MoleculeStartValuesChangedEvent(this, EventArgs.Empty);
            _selectParameterStartValues.SelectionChanged += () => ParameterStartValuesChangedEvent(this, EventArgs.Empty);
            _selectSpatialStructure.SelectionChanged     += () => SpatialStructureChangedEvent(this, EventArgs.Empty);
            _selectMoleculePresenter.SelectionChanged    += () => MoleculeBuildingBlockChangedEvent(this, EventArgs.Empty);
        }
 public void AttachPresenter(IBuildingBlockSelectionPresenter presenter)
 {
     _presenter = presenter;
 }