Exemple #1
0
        public PlotWindowPane()
        {
            Caption = Resources.PlotWindowCaption;

            // this value matches with icmdShowPlotWindow's Icon in VSCT file
            BitmapImageMoniker = KnownMonikers.LineChart;

            var sessionProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IRSessionProvider>();
            var historyProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IPlotHistoryProvider>();

            _plotHistory = historyProvider.GetPlotHistory(sessionProvider.GetInteractiveWindowRSession());
            _plotHistory.PlotContentProvider.Locator = this;
            _plotHistory.HistoryChanged += OnPlotHistoryHistoryChanged;

            var presenter = new XamlPresenter(_plotHistory.PlotContentProvider);

            presenter.SizeChanged += PlotWindowPane_SizeChanged;

            Content = presenter;

            // initialize toolbar. Commands are added via package
            // so they appear correctly in the top level menu as well
            // as on the plot window toolbar
            this.ToolBar = new CommandID(RGuidList.RCmdSetGuid, RPackageCommandId.plotWindowToolBarId);
        }
        public PlotWindowPane() {
            Caption = Resources.PlotWindowCaption;

            // this value matches with icmdShowPlotWindow's Icon in VSCT file
            BitmapImageMoniker = KnownMonikers.LineChart;

            var sessionProvider = VsAppShell.Current.ExportProvider.GetExportedValue<IRSessionProvider>();
            var historyProvider = VsAppShell.Current.ExportProvider.GetExportedValue<IPlotHistoryProvider>();

            _plotHistory = historyProvider.GetPlotHistory(sessionProvider.GetInteractiveWindowRSession());
            _plotHistory.HistoryChanged += OnPlotHistoryHistoryChanged;

            var presenter = new XamlPresenter(_plotHistory.PlotContentProvider);
            presenter.SizeChanged += PlotWindowPane_SizeChanged;
            Content = presenter;

            // initialize toolbar. Commands are added via package
            // so they appear correctly in the top level menu as well 
            // as on the plot window toolbar
            this.ToolBar = new CommandID(RGuidList.RCmdSetGuid, RPackageCommandId.plotWindowToolBarId);
        }
Exemple #3
0
 public EndLocatorCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdEndLocator)
 {
 }
 public HistoryPreviousPlotCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdPrevPlot) {
 }
 public HistoryNextPlotCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdNextPlot) {
 }
Exemple #6
0
 public RemovePlotCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdRemovePlot)
 {
 }
 public ExportPlotAsImageCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdExportPlotAsImage)
 {
 }
Exemple #8
0
 public PlotWindowCommand(IPlotHistory plotHistory, int id) :
     base(RGuidList.RCmdSetGuid, id)
 {
     PlotHistory = plotHistory;
 }
Exemple #9
0
 public HistoryPreviousPlotCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdPrevPlot)
 {
 }
 public ExportPlotAsImageCommand(IApplicationShell appShell, IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdExportPlotAsImage)
 {
     _appShell = appShell;
 }
 public RemovePlotCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdRemovePlot) {
 }
 public ExportPlotAsPdfCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdExportPlotAsPdf) {
 }
 protected override void Dispose(bool disposing) {
     _plotHistory?.Dispose();
     _plotHistory = null;
     base.Dispose(disposing);
 }
 public CopyPlotAsBitmapCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdCopyPlotAsBitmap) {
 }
 public PlotWindowCommand(IPlotHistory plotHistory, int id) : 
     base(RGuidList.RCmdSetGuid, id) {
     PlotHistory = plotHistory;
 }
 public CopyPlotAsBitmapCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdCopyPlotAsBitmap)
 {
 }
Exemple #17
0
 public ClearPlotsCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdClearPlots)
 {
 }
 public CopyPlotAsMetafileCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdCopyPlotAsMetafile) {
 }
 public CopyPlotAsMetafileCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdCopyPlotAsMetafile)
 {
 }
Exemple #20
0
 protected override void Dispose(bool disposing)
 {
     _plotHistory?.Dispose();
     _plotHistory = null;
     base.Dispose(disposing);
 }
 public HistoryNextPlotCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdNextPlot)
 {
 }
 public ClearPlotsCommand(IPlotHistory plotHistory) :
     base(plotHistory, RPackageCommandId.icmdClearPlots) {
 }