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(); }
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(); }