Exemple #1
0
        protected override void OnCreate()
        {
            var variableView = (VariableView)Content;
            var controller   = new AsyncCommandController()
                               .AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Copy, new CopyVariableCommand(variableView))
                               .AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Delete, new DeleteVariableCommand(variableView))
                               .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdCopyValue, new CopyVariableValueCommand(variableView))
                               .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdShowDetails, new ShowVariableDetailsCommand(variableView))
                               .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdOpenInCsvApp, new OpenVariableInCsvCommand(variableView));

            _commandTarget = new CommandTargetToOleShim(null, controller);
            base.OnCreate();
        }
Exemple #2
0
        protected override void OnCreate()
        {
            Component = new HelpVisualComponent {
                Container = this
            };
            var controller = new AsyncCommandController()
                             .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdHelpHome, new HelpHomeCommand(_coreShell.ExportProvider))
                             .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdHelpNext, new HelpNextCommand(Component))
                             .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdHelpPrevious, new HelpPreviousCommand(Component))
                             .AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdHelpRefresh, new HelpRefreshCommand(Component));

            ToolBarCommandTarget = new CommandTargetToOleShim(null, controller);
            base.OnCreate();
        }
        protected override void OnCreate()
        {
            var controller      = new AsyncCommandController();
            var visualComponent = new RPlotHistoryVisualComponent(_plotManager, controller, this, _coreShell);
            var commands        = new RPlotHistoryCommands(_plotManager.InteractiveWorkflow, visualComponent);

            controller.AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Copy, commands.Copy);
            controller.AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Cut, commands.Cut);
            controller.AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Delete, commands.Remove);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdPlotHistoryActivatePlot, commands.ActivatePlot);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdPlotHistoryZoomIn, commands.ZoomIn);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdPlotHistoryZoomOut, commands.ZoomOut);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdPlotHistoryAutoHide, commands.AutoHide);
            Component      = visualComponent;
            _commandTarget = new CommandTargetToOleShim(null, Component.Controller);
            base.OnCreate();
        }
Exemple #4
0
        protected override void OnCreate()
        {
            var controller      = new AsyncCommandController();
            var visualComponent = new RPlotDeviceVisualComponent(_plotManager, controller, _instanceId, this, _coreShell);
            var commands        = new RPlotDeviceCommands(_plotManager.InteractiveWorkflow, visualComponent);

            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdActivatePlotWindow, commands.ActivatePlotDevice);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdClearPlots, commands.RemoveAllPlots);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdRemovePlot, commands.RemoveCurrentPlot);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdNextPlot, commands.NextPlot);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdPrevPlot, commands.PreviousPlot);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdExportPlotAsImage, commands.ExportAsImage);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdExportPlotAsPdf, commands.ExportAsPdf);
            controller.AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Copy, commands.Copy);
            controller.AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Cut, commands.Cut);
            controller.AddCommand(VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Paste, commands.Paste);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdCopyPlotAsBitmap, commands.CopyAsBitmap);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdCopyPlotAsMetafile, commands.CopyAsMetafile);
            controller.AddCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdEndLocator, commands.EndLocator);
            Component = visualComponent;
            _plotManager.RegisterVisualComponent(Component);
            _commandTarget = new CommandTargetToOleShim(null, Component.Controller);
            base.OnCreate();
        }