public RPlotDeviceVisualComponent(IRPlotManager plotManager , int instanceId , IVisualComponentContainer <IRPlotDeviceVisualComponent> container , IServiceContainer services) { Check.ArgumentNull(nameof(plotManager), plotManager); Check.ArgumentNull(nameof(plotManager), plotManager); _mainThread = services.MainThread(); _viewModel = new RPlotDeviceViewModel(plotManager, _mainThread, instanceId); var control = new RPlotDeviceControl { DataContext = _viewModel, }; _disposableBag = DisposableBag.Create <RPlotDeviceVisualComponent>() .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested) .Add(() => _viewModel.DeviceNameChanged -= ViewModel_DeviceNameChanged) .Add(() => _viewModel.LocatorModeChanged -= ViewModel_LocatorModeChanged) .Add(() => _viewModel.PlotChanged -= ViewModel_PlotChanged) .Add(() => plotManager.ActiveDeviceChanged -= PlotManager_ActiveDeviceChanged); control.ContextMenuRequested += Control_ContextMenuRequested; _viewModel.DeviceNameChanged += ViewModel_DeviceNameChanged; _viewModel.LocatorModeChanged += ViewModel_LocatorModeChanged; _viewModel.PlotChanged += ViewModel_PlotChanged; plotManager.ActiveDeviceChanged += PlotManager_ActiveDeviceChanged; Control = control; Container = container; }
public RPlotHistoryVisualComponent(IRPlotManager plotManager, ICommandTarget controller, IVisualComponentContainer <IRPlotHistoryVisualComponent> container, ICoreShell coreShell) { if (plotManager == null) { throw new ArgumentNullException(nameof(plotManager)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } if (coreShell == null) { throw new ArgumentNullException(nameof(coreShell)); } _plotManager = plotManager; _viewModel = new RPlotHistoryViewModel(plotManager, coreShell); _shell = coreShell; var control = new RPlotHistoryControl { DataContext = _viewModel }; _disposableBag = DisposableBag.Create <RPlotDeviceVisualComponent>() .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested); control.ContextMenuRequested += Control_ContextMenuRequested; Control = control; Controller = controller; Container = container; }
public RPlotHistoryVisualComponent(IRPlotManager plotManager, ICommandTarget controller, IVisualComponentContainer<IRPlotHistoryVisualComponent> container, ICoreShell coreShell) { if (plotManager == null) { throw new ArgumentNullException(nameof(plotManager)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } if (coreShell == null) { throw new ArgumentNullException(nameof(coreShell)); } _plotManager = plotManager; _viewModel = new RPlotHistoryViewModel(plotManager, coreShell); _shell = coreShell; var control = new RPlotHistoryControl { DataContext = _viewModel }; _disposableBag = DisposableBag.Create<RPlotDeviceVisualComponent>() .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested); control.ContextMenuRequested += Control_ContextMenuRequested; Control = control; Controller = controller; Container = container; }
public RInteractiveWindowVisualComponent(IInteractiveWindow interactiveWindow, IVisualComponentContainer<IInteractiveWindowVisualComponent> container) { InteractiveWindow = interactiveWindow; Container = container; var textView = interactiveWindow.TextView; Controller = ServiceManagerBase.GetService<ICommandTarget>(textView); Control = textView.VisualElement; interactiveWindow.Properties.AddProperty(typeof(IInteractiveWindowVisualComponent), this); }
public RPlotManagerVisualComponent(IRPlotManager plotManager, IVisualComponentContainer <IRPlotManagerVisualComponent> container, IRSettings settings, ICoreShell coreShell) { Container = container; Controller = null; ViewModel = new RPlotManagerViewModel(plotManager); Control = new RPlotManagerControl { DataContext = ViewModel, }; }
public ConnectionManagerVisualComponent(IConnectionManager connectionManager, IVisualComponentContainer<IConnectionManagerVisualComponent> container, ICoreShell coreShell) { _viewModel = new ConnectionManagerViewModel(connectionManager, coreShell); Container = container; Controller = null; var control = new ConnectionManagerControl(coreShell) { DataContext = _viewModel }; Control = control; }
public RHistoryWindowVisualComponent(ITextBuffer historyTextBuffer, IRHistoryProvider historyProvider, ITextEditorFactoryService textEditorFactory, IVisualComponentContainer <IRHistoryWindowVisualComponent> container) { _container = container; _history = historyProvider.GetAssociatedRHistory(historyTextBuffer); TextView = CreateTextView(historyTextBuffer, textEditorFactory); TextView.Selection.SelectionChanged += TextViewSelectionChanged; Control = textEditorFactory.CreateTextViewHost(TextView, false).HostControl; }
public RHistoryWindowVisualComponent(ITextBuffer historyTextBuffer, IRHistoryProvider historyProvider, ITextEditorFactoryService textEditorFactory, IVisualComponentContainer<IRHistoryWindowVisualComponent> container) { _container = container; _history = historyProvider.GetAssociatedRHistory(historyTextBuffer); TextView = CreateTextView(historyTextBuffer, textEditorFactory); Control = textEditorFactory.CreateTextViewHost(TextView, false).HostControl; Controller = ServiceManagerBase.GetService<ICommandTarget>(TextView); TextView.Selection.SelectionChanged += TextViewSelectionChanged; }
public ConnectionManagerVisualComponent(IConnectionManager connectionManager, IVisualComponentContainer <IConnectionManagerVisualComponent> container, IRSettings settings, ICoreShell coreShell) { _viewModel = new ConnectionManagerViewModel(connectionManager, settings, coreShell); Container = container; var control = new ConnectionManagerControl(coreShell) { DataContext = _viewModel }; Control = control; }
public ConnectionManagerVisualComponent(IConnectionManager connectionManager, IVisualComponentContainer <IConnectionManagerVisualComponent> container, ICoreShell coreShell) { _viewModel = new ConnectionManagerViewModel(connectionManager, coreShell); Container = container; Controller = null; var control = new ConnectionManagerControl { DataContext = _viewModel }; Control = control; }
public RInteractiveWindowVisualComponent(IInteractiveWindow interactiveWindow, IVisualComponentContainer <IInteractiveWindowVisualComponent> container) { InteractiveWindow = interactiveWindow; Container = container; var textView = interactiveWindow.TextView; Controller = ServiceManagerBase.GetService <ICommandTarget>(textView); Control = textView.VisualElement; interactiveWindow.Properties.AddProperty(typeof(IInteractiveWindowVisualComponent), this); }
public ConnectionManagerVisual(IConnectionManager connectionManager, IVisualComponentContainer <IConnectionManagerVisual> container, IServiceContainer services) { _viewModel = new ConnectionManagerViewModel(connectionManager, services); Container = container; var control = new ConnectionManagerControl(services) { DataContext = _viewModel }; Control = control; }
public RPackageManagerVisualComponent(IRPackageManager packageManager, IVisualComponentContainer<IRPackageManagerVisualComponent> container, ISearchControlProvider searchControlProvider, IRSettings settings, ICoreShell coreShell) { _viewModel = new RPackageManagerViewModel(packageManager, settings, coreShell); Container = container; Controller = null; var control = new PackageManagerControl { DataContext = _viewModel, }; Control = control; var searchControlSettings = new SearchControlSettings { SearchCategory = SearchCategory, MinWidth = (uint)control.SearchControlHost.MinWidth, MaxWidth = uint.MaxValue }; _searchControl = searchControlProvider.Create(control.SearchControlHost, _viewModel, searchControlSettings); }
public RInteractiveWindowVisualComponent(IInteractiveWindow interactiveWindow, IVisualComponentContainer<IInteractiveWindowVisualComponent> container, IRSessionProvider sessionProvider, ICoreShell shell) { InteractiveWindow = interactiveWindow; Container = container; _sessionProvider = sessionProvider; _shell = shell; sessionProvider.BrokerStateChanged += OnBrokerChanged; var textView = interactiveWindow.TextView; Controller = ServiceManagerBase.GetService<ICommandTarget>(textView); Control = textView.VisualElement; interactiveWindow.Properties.AddProperty(typeof(IInteractiveWindowVisualComponent), this); UpdateWindowTitle(_sessionProvider.IsConnected); }
public RInteractiveWindowVisualComponent(IInteractiveWindow interactiveWindow, IVisualComponentContainer <IInteractiveWindowVisualComponent> container, IRSessionProvider sessionProvider, ICoreShell shell) { InteractiveWindow = interactiveWindow; Container = container; _sessionProvider = sessionProvider; _shell = shell; sessionProvider.BrokerStateChanged += OnBrokerChanged; var textView = interactiveWindow.TextView; Control = textView.VisualElement; interactiveWindow.Properties.AddProperty(typeof(IInteractiveWindowVisualComponent), this); UpdateWindowTitle(_sessionProvider.IsConnected); }
public RPackageManagerVisualComponent(IRPackageManager packageManager, IVisualComponentContainer <IRPackageManagerVisualComponent> container, ISearchControlProvider searchControlProvider, IRSettings settings, ICoreShell coreShell) { _viewModel = new RPackageManagerViewModel(packageManager, settings, coreShell); Container = container; var control = new PackageManagerControl { DataContext = _viewModel, }; Control = control; var searchControlSettings = new SearchControlSettings { SearchCategory = SearchCategory, MinWidth = (uint)control.SearchControlHost.MinWidth, MaxWidth = uint.MaxValue }; _searchControl = searchControlProvider.Create(control.SearchControlHost, _viewModel, searchControlSettings); }
public RPlotHistoryVisualComponent(IRPlotManager plotManager, IVisualComponentContainer <IRPlotHistoryVisualComponent> container, IServiceContainer services) { Check.ArgumentNull(nameof(plotManager), plotManager); Check.ArgumentNull(nameof(container), container); Check.ArgumentNull(nameof(services), services); var control = new RPlotHistoryControl(); _viewModel = new RPlotHistoryViewModel(control, plotManager, services.MainThread()); control.DataContext = _viewModel; _disposableBag = DisposableBag.Create <RPlotDeviceVisualComponent>() .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested); control.ContextMenuRequested += Control_ContextMenuRequested; Control = control; Container = container; }
public RPlotDeviceVisualComponent(IRPlotManager plotManager, ICommandTarget controller, int instanceId, IVisualComponentContainer <IRPlotDeviceVisualComponent> container, ICoreShell coreShell) { if (plotManager == null) { throw new ArgumentNullException(nameof(plotManager)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } if (coreShell == null) { throw new ArgumentNullException(nameof(coreShell)); } _plotManager = plotManager; _viewModel = new RPlotDeviceViewModel(plotManager, coreShell, instanceId); _shell = coreShell; var control = new RPlotDeviceControl { DataContext = _viewModel, }; _disposableBag = DisposableBag.Create <RPlotDeviceVisualComponent>() .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested) .Add(() => _viewModel.DeviceNameChanged -= ViewModel_DeviceNameChanged) .Add(() => _viewModel.LocatorModeChanged -= ViewModel_LocatorModeChanged) .Add(() => _viewModel.PlotChanged += ViewModel_PlotChanged) .Add(() => _plotManager.ActiveDeviceChanged += PlotManager_ActiveDeviceChanged); control.ContextMenuRequested += Control_ContextMenuRequested; _viewModel.DeviceNameChanged += ViewModel_DeviceNameChanged; _viewModel.LocatorModeChanged += ViewModel_LocatorModeChanged; _viewModel.PlotChanged += ViewModel_PlotChanged; _plotManager.ActiveDeviceChanged += PlotManager_ActiveDeviceChanged; Control = control; Controller = controller; Container = container; }
public RPackageManagerVisualComponent(IRPackageManager packageManager, IVisualComponentContainer <IRPackageManagerVisualComponent> container, ISearchControlProvider searchControlProvider, IServiceContainer services) { Container = container; var control = new PackageManagerControl(services); Control = control; var infoBarProvider = services.GetService <IInfoBarProvider>(); var infoBar = infoBarProvider.Create(control.InfoBarControlHost); _viewModel = new RPackageManagerViewModel(packageManager, infoBar, services); var searchControlSettings = new SearchControlSettings { SearchCategory = SearchCategory, MinWidth = (uint)control.SearchControlHost.MinWidth, MaxWidth = uint.MaxValue }; _searchControl = searchControlProvider.Create(control.SearchControlHost, _viewModel, searchControlSettings); control.DataContext = _viewModel; }
public RPlotDeviceVisualComponent(IRPlotManager plotManager, ICommandTarget controller, int instanceId, IVisualComponentContainer<IRPlotDeviceVisualComponent> container, ICoreShell coreShell) { if (plotManager == null) { throw new ArgumentNullException(nameof(plotManager)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } if (coreShell == null) { throw new ArgumentNullException(nameof(coreShell)); } _plotManager = plotManager; _viewModel = new RPlotDeviceViewModel(plotManager, coreShell, instanceId); _shell = coreShell; var control = new RPlotDeviceControl { DataContext = _viewModel, }; _disposableBag = DisposableBag.Create<RPlotDeviceVisualComponent>() .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested) .Add(() => _viewModel.DeviceNameChanged -= ViewModel_DeviceNameChanged) .Add(() => _viewModel.LocatorModeChanged -= ViewModel_LocatorModeChanged) .Add(() => _viewModel.PlotChanged += ViewModel_PlotChanged) .Add(() => _plotManager.ActiveDeviceChanged += PlotManager_ActiveDeviceChanged); control.ContextMenuRequested += Control_ContextMenuRequested; _viewModel.DeviceNameChanged += ViewModel_DeviceNameChanged; _viewModel.LocatorModeChanged += ViewModel_LocatorModeChanged; _viewModel.PlotChanged += ViewModel_PlotChanged; _plotManager.ActiveDeviceChanged += PlotManager_ActiveDeviceChanged; Control = control; Controller = controller; Container = container; }