Beispiel #1
0
        private void PlotWindowPane_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
        {
            var unadjustedPixelSize = WpfUnitsConversion.ToPixels(Content as Visual, e.NewSize);

            // If the window gets below a certain minimum size, plot to the minimum size
            // and user will be able to use scrollbars to see the whole thing
            int pixelWidth  = Math.Max((int)unadjustedPixelSize.Width, MinPixelWidth);
            int pixelHeight = Math.Max((int)unadjustedPixelSize.Height, MinPixelHeight);

            // Throttle resize requests since we get a lot of size changed events when the tool window is undocked
            IdleTimeAction.Cancel(this);
            IdleTimeAction.Create(() => {
                PlotContentProvider.DoNotWait(_plotHistory.PlotContentProvider.ResizePlotAsync(pixelWidth, pixelHeight));
            }, 100, this);
        }
Beispiel #2
0
 public PlotHistory(IRSession session)
 {
     ActivePlotIndex                  = -1;
     PlotContentProvider              = new PlotContentProvider(session);
     PlotContentProvider.PlotChanged += OnPlotChanged;
 }
Beispiel #3
0
 public PlotHistory(IRSession session) {
     ActivePlotIndex = -1;
     PlotContentProvider = new PlotContentProvider(session);
     PlotContentProvider.PlotChanged += OnPlotChanged;
 }