Exemplo n.º 1
0
        protected ChartPresenter(
            TView view,
            ChartPresenterContext chartPresenterContext,
            IChartTemplatingTask chartTemplatingTask,
            IIndividualPKAnalysisPresenter pkAnalysisPresenter,
            IChartTask chartTask,
            IObservedDataTask observedDataTask,
            IChartUpdater chartUpdater, bool useSimulationNameToCreateCurveName)
            : base(view, chartPresenterContext)
        {
            _chartTask        = chartTask;
            _observedDataTask = observedDataTask;
            _chartUpdater     = chartUpdater;
            _useSimulationNameToCreateCurveName = useSimulationNameToCreateCurveName;
            _view.SetChartView(chartPresenterContext.EditorAndDisplayPresenter.BaseView);
            _pkAnalysisPresenter = pkAnalysisPresenter;
            _view.SetPKAnalysisView(_pkAnalysisPresenter.View);
            AddSubPresenters(_pkAnalysisPresenter);
            _chartTemplatingTask = chartTemplatingTask;
            _repositoryCache     = new Cache <DataRepository, IndividualSimulation> {
                OnMissingKey = noDataForSimulation
            };

            ChartEditorPresenter.SetShowDataColumnInDataBrowserDefinition(IsColumnVisibleInDataBrowser);
            ChartDisplayPresenter.DragDrop   += OnDragDrop;
            ChartDisplayPresenter.DragOver   += OnDragOver;
            ChartDisplayPresenter.ExportToPDF = () => _chartTask.ExportToPDF(Chart);
            AddAllButtons();
            _chartDisplayMode           = ChartDisplayMode.Chart;
            _observedDataDragDropBinder = new ObservedDataDragDropBinder();
        }
Exemplo n.º 2
0
 private void configureChartEditorPresenter(IDataColumnToPathElementsMapper dataColumnToPathColumnValuesMapper)
 {
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.RepositoryName).GroupIndex      = 0;
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.DimensionName).GroupIndex       = 1;
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.Simulation).GroupIndex          = -1;
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.TopContainer).Caption           = "TopC";
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.Container).Caption              = "Container";
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.BottomCompartment).VisibleIndex = 2;
     ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.Molecule).SortColumnName        = BrowserColumns.OrderIndex.ToString();
     ChartEditorPresenter.SetDisplayQuantityPathDefinition(setQuantityPathDefinitions(_model, dataColumnToPathColumnValuesMapper));
     ChartEditorPresenter.SetShowDataColumnInDataBrowserDefinition(showDataColumnInDataBrowserDefinition);
     ChartEditorPresenter.ApplyAllColumnSettings();
 }