protected override void Context()
        {
            _view = A.Fake <IChartEditorView>();
            _axisSettingsPresenter        = A.Fake <IAxisSettingsPresenter>();
            _chartSettingsPresenter       = A.Fake <IChartSettingsPresenter>();
            _chartExportSettingsPresenter = A.Fake <IChartExportSettingsPresenter>();
            _curveSettingsPresenter       = A.Fake <ICurveSettingsPresenter>();
            _dataBrowserPresenter         = A.Fake <IDataBrowserPresenter>();
            _chartTemplateMenuPresenter   = A.Fake <IChartTemplateMenuPresenter>();
            _chartUpdater     = A.Fake <IChartUpdater>();
            _eventPublisher   = A.Fake <IEventPublisher>();
            _dimensionFactory = A.Fake <IDimensionFactory>();
            sut = new ChartEditorPresenter(_view, _axisSettingsPresenter, _chartSettingsPresenter, _chartExportSettingsPresenter, _curveSettingsPresenter, _dataBrowserPresenter, _chartTemplateMenuPresenter, _chartUpdater, _eventPublisher, _dimensionFactory);

            sut.SetCurveNameDefinition(x => x.QuantityInfo.PathAsString);

            _chart = new CurveChart().WithAxes();
            sut.Edit(_chart);

            _baseGrid       = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs());
            _standardColumn = new DataColumn("Standard", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid)
            {
                DataInfo = new DataInfo(ColumnOrigins.Calculation),
            };

            A.CallTo(() => _dimensionFactory.MergedDimensionFor(_baseGrid)).Returns(_baseGrid.Dimension);
            A.CallTo(() => _dimensionFactory.MergedDimensionFor(_standardColumn)).Returns(_standardColumn.Dimension);
        }
Пример #2
0
        private void configureChartEditorEvents()
        {
            ChartEditorPresenter.ColumnSettingsFor(BrowserColumns.Origin).Visible = true;

            ChartEditorPresenter.SetCurveNameDefinition(Helper.NameDefinition);
            ChartEditorPresenter.ColumnSettingsFor(CurveOptionsColumns.InterpolationMode).Visible = false;

            ChartEditorPresenter.ColumnSettingsFor(AxisOptionsColumns.NumberMode).Caption      = "Number Representation";
            ChartEditorPresenter.ColumnSettingsFor(AxisOptionsColumns.NumberMode).VisibleIndex = 1;

            ChartDisplayPresenter.Edit(Chart);

            ChartDisplayPresenter.DragOver += onChartDisplayDragOver;

            ReloadMenus();
        }