public async Task ResizePlot() { await InitializeGraphicsDevice(); await ExecuteAndWaitForPlotsAsync(new [] { "plot(1:10)", }); var plotVC = _plotVisual.GetPlotVisualComponent(_workflow.Plots.ActiveDevice); var expectedSize = GetPixelSize(600, 500); var bs = _plotVisual.ActiveDevice.ActivePlot.Image as BitmapSource; bs.PixelWidth.Should().Be((int)expectedSize.Width); bs.PixelHeight.Should().Be((int)expectedSize.Height); var plotReceivedTask = EventTaskSources.IRPlotDevice.PlotAddedOrUpdated.Create(_workflow.Plots.ActiveDevice); _plotVisualComponent.Control.Height = 450; await plotReceivedTask; var expectedModifiedSize = GetPixelSize(600, 450); bs = _plotVisual.ActiveDevice.ActivePlot.Image as BitmapSource; bs.PixelWidth.Should().Be((int)expectedModifiedSize.Width); bs.PixelHeight.Should().Be((int)expectedModifiedSize.Height); }
public async Task AllCommandsDisabledWhenNoPlot() { await InitializeGraphicsDevice(); var plotVC = _plotManager.GetPlotVisualComponent(_plotManager.ActiveDevice); CheckEnabledCommands(plotVC, isFirst: false, isLast: false, anyPlot: false); }