public IVisualComponentContainer <IRPlotDeviceVisualComponent> GetOrCreate(IRPlotManagerVisual plotManager, IRSession session, int instanceId = 0)
 {
     return(GetOrCreate(instanceId, container
                        => new RPlotDeviceVisualComponent(plotManager, instanceId, container, _coreShell.Services)
     {
         TestDeviceProperties = DeviceProperties
     }));
 }
Ejemplo n.º 2
0
        public async Task InitializeAsync()
        {
            await _remoteBroker.ConnectAsync(_workflow.RSessions);

            _replVisualComponent = await _workflow.GetOrCreateVisualComponentAsync();

            _plotManager = (IRPlotManagerVisual)_workflow.Plots;
            _plotDeviceVisualComponentContainerFactory.DeviceProperties = new PlotDeviceProperties(600, 500, 96);
        }
Ejemplo n.º 3
0
        public async Task InitializeAsync()
        {
            await _workflow.RSessions.TrySwitchBrokerAsync(nameof(RPlotIntegrationTest));

            _replVisualComponent = await _workflow.GetOrCreateVisualComponentAsync();

            _plotManager = (IRPlotManagerVisual)_workflow.Plots;
            _plotDeviceVisualComponentContainerFactory.DeviceProperties = new PlotDeviceProperties(600, 500, 96);
        }
Ejemplo n.º 4
0
        public PlotDeviceWindowPane(IRPlotManagerVisual plotManager, IRSession session, int instanceId, IServiceContainer services) : base(services)
        {
            _plotManager = plotManager;
            _instanceId  = instanceId;

            // this value matches with icmdShowPlotWindow's Icon in VSCT file
            BitmapImageMoniker = KnownMonikers.LineChart;
            Caption            = Resources.PlotWindowCaption;
            ToolBar            = new System.ComponentModel.Design.CommandID(RGuidList.RCmdSetGuid, RPackageCommandId.plotWindowToolBarId);
        }
Ejemplo n.º 5
0
        public RPlotIntegrationUITest(IServiceContainer services, ContainerHostMethodFixture containerHost)
        {
            _containerHost = containerHost;
            _plotDeviceVisualComponentContainerFactory = services.GetService <TestRPlotDeviceVisualComponentContainerFactory>();

            // Don't override the standard behavior of using the control size
            _plotDeviceVisualComponentContainerFactory.DeviceProperties = null;
            _plotHistoryVisualComponentContainerFactory = services.GetService <IRPlotHistoryVisualComponentContainerFactory>();
            _workflow            = services.GetService <IRInteractiveWorkflowVisualProvider>().GetOrCreate();
            _plotVisual          = (IRPlotManagerVisual)_workflow.Plots;
            _plotVisualComponent = UIThreadHelper.Instance.Invoke(() => _workflow.Plots.GetOrCreateVisualComponent(_plotDeviceVisualComponentContainerFactory, PlotWindowInstanceId));
            UIThreadHelper.Instance.Invoke(() => ((IRPlotManagerVisual)_workflow.Plots).RegisterVisualComponent(_plotVisualComponent));
        }
Ejemplo n.º 6
0
 public IVisualComponentContainer <IRPlotDeviceVisualComponent> GetOrCreate(IRPlotManagerVisual plotManager, IRSession session, int instanceId = 0)
 {
     return(GetOrCreate(instanceId, i => new PlotDeviceWindowPane(plotManager, session, i, _coreShell.Services)));
 }
Ejemplo n.º 7
0
 public ShowPlotWindowCommand(ICoreShell shell, IRInteractiveWorkflow workflow)
 {
     _plotManager = workflow.Plots as IRPlotManagerVisual;
     _shell       = shell.GetService <IVsUIShell4>(typeof(SVsUIShell));
 }