AddCommandSet() public method

Adds a set of commands to the controller command table
public AddCommandSet ( IEnumerable commands ) : void
commands IEnumerable List of commands
return void
        public HelpWindowVisualComponent() {
            _session = VsAppShell.Current.ExportProvider.GetExportedValue<IRSessionProvider>().GetInteractiveWindowRSession();
            _session.Disconnected += OnRSessionDisconnected;

            _windowContentControl = new ContentControl();
            Control = _windowContentControl;

            var c = new Controller();
            c.AddCommandSet(GetCommands());
            Controller = c;

            CreateBrowser();
            VSColorTheme.ThemeChanged += OnColorThemeChanged;
        }
Esempio n. 2
0
        public HelpVisualComponent() {
            _codeColorBuilder = VsAppShell.Current.ExportProvider.GetExportedValue<IVignetteCodeColorBuilder>();
            _coreShell = VsAppShell.Current.ExportProvider.GetExportedValue<ICoreShell>();

            var workflow = VsAppShell.Current.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>().GetOrCreate();
            workflow.RSessions.BrokerStateChanged += OnBrokerStateChanged;

            _session = workflow.RSession;
            _session.Disconnected += OnRSessionDisconnected;

            _windowContentControl = new ContentControl();
            Control = _windowContentControl;

            var c = new Controller();
            c.AddCommandSet(GetCommands());
            Controller = c;

            CreateBrowser();
            VSColorTheme.ThemeChanged += OnColorThemeChanged;
        }