コード例 #1
0
        public RunToRunRegressionToolbar(GraphSummary graphSummary) :
            base(graphSummary)
        {
            InitializeComponent();

            toolStrip1_Resize(null, null);
        }
コード例 #2
0
 public RTScheduleGraphPane(GraphSummary graphSummary)
     : base(graphSummary)
 {
     XAxis.Title.Text    = Resources.RTScheduleGraphPane_RTScheduleGraphPane_Scheduled_Time;
     YAxis.Scale.MinAuto = false;
     YAxis.Scale.Min     = 0;
 }
コード例 #3
0
 protected SummaryReplicateGraphPane(GraphSummary graphSummary)
     : base(graphSummary)
 {
     XAxis.Title.Text       = Resources.SummaryReplicateGraphPane_SummaryReplicateGraphPane_Replicate;
     XAxis.Type             = AxisType.Text;
     IsRepeatRemovalAllowed = true;
 }
コード例 #4
0
        public bool ShowDelete(Point mousePt)
        {
            var regressionGraphPane = GraphSummary.GraphPaneFromPoint(mousePt) as RTLinearRegressionGraphPane;

            return(regressionGraphPane != null &&
                   regressionGraphPane.AllowDeletePoint(new PointF(mousePt.X, mousePt.Y)));
        }
コード例 #5
0
 public void OnRatioIndexChanged()
 {
     if (GraphSummary.GraphPanes.OfType <AreaReplicateGraphPane>().Any() /* || !Settings.Default.AreaAverageReplicates */)
     {
         GraphSummary.UpdateUI();
     }
 }
コード例 #6
0
 public void OnActiveLibraryChanged()
 {
     if (GraphSummary.GraphPanes.OfType <AreaReplicateGraphPane>().Any())
     {
         GraphSummary.UpdateUI();
     }
 }
コード例 #7
0
        public void OnUpdateGraph()
        {
            switch (GraphSummary.Type)
            {
            case GraphTypeSummary.replicate:
            case GraphTypeSummary.peptide:
                GraphSummary.DoUpdateGraph(this, GraphSummary.Type);
                break;

            case GraphTypeSummary.histogram:
                if (!(GraphSummary.GraphPanes.FirstOrDefault() is MassErrorHistogramGraphPane))
                {
                    GraphSummary.GraphPanes = new[] { new MassErrorHistogramGraphPane(GraphSummary) }
                }
                ;
                break;

            case GraphTypeSummary.histogram2d:
                if (!(GraphSummary.GraphPanes.FirstOrDefault() is MassErrorHistogram2DGraphPane))
                {
                    GraphSummary.GraphPanes = new[] { new MassErrorHistogram2DGraphPane(GraphSummary) }
                }
                ;
                break;
            }
        }
コード例 #8
0
 public void OnNormalizeOptionChanged()
 {
     if (GraphSummary.GraphPanes.OfType <MassErrorReplicateGraphPane>().Any() /* || !Settings.Default.AreaAverageReplicates */)
     {
         GraphSummary.UpdateUI();
     }
 }
コード例 #9
0
        public RTLinearRegressionGraphPane(GraphSummary graphSummary)
            : base(graphSummary)
        {
            XAxis.Title.Text = Resources.RTLinearRegressionGraphPane_RTLinearRegressionGraphPane_Score;

            Settings.Default.RTScoreCalculatorList.ListChanged += RTScoreCalculatorList_ListChanged;
        }
コード例 #10
0
        public bool HandleKeyDownEvent(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
//                case Keys.D3:
//                    if (e.Alt)
//                        GraphSummary.Hide();
//                    break;
            case Keys.F7:
                if (!e.Alt && !(e.Shift && e.Control))
                {
                    if (e.Control)
                    {
                        Settings.Default.AreaGraphType = GraphTypeArea.peptide.ToString();
                    }
                    else
                    {
                        Settings.Default.AreaGraphType = GraphTypeArea.replicate.ToString();
                    }
                    GraphSummary.UpdateUI();
                }
                break;
            }
            return(false);
        }
コード例 #11
0
 public RTScheduleGraphPane(GraphSummary graphSummary)
     : base(graphSummary)
 {
     XAxis.Title.Text = Resources.RTScheduleGraphPane_RTScheduleGraphPane_Scheduled_Time;
     YAxis.Scale.MinAuto = false;
     YAxis.Scale.Min = 0;
 }
コード例 #12
0
 public AreaCVHistogram2DGraphPane(GraphSummary graphSummary)
     : base(graphSummary)
 {
     _areaCVGraphData = null;
     _lineItems       = new LineItem[2];
     _cache           = new AreaCVGraphData.AreaCVGraphDataCache();
 }
コード例 #13
0
        public bool HandleKeyDownEvent(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
//                case Keys.D2:
//                    if (e.Alt)
//                    {
//                        GraphSummary.Hide();
//                        return true;
//                    }
//                    break;
            case Keys.F8:
                if (!e.Alt && !(e.Shift && e.Control))
                {
                    if (e.Shift)
                    {
                        GraphType = GraphTypeRT.regression;
                    }
                    else if (e.Control)
                    {
                        GraphType = GraphTypeRT.peptide;
                    }
                    else
                    {
                        GraphType = GraphTypeRT.replicate;
                    }
                    GraphSummary.UpdateUI();
                    return(true);
                }
                break;
            }
            return(false);
        }
コード例 #14
0
 public void OnResultsIndexChanged()
 {
     if (GraphSummary.GraphPanes.OfType <AreaReplicateGraphPane>().Any() /* || !Settings.Default.AreaAverageReplicates */ ||
         RTLinearRegressionGraphPane.ShowReplicate == ReplicateDisplay.single)
     {
         GraphSummary.UpdateUI();
     }
 }
コード例 #15
0
 public void OnResultsIndexChanged()
 {
     if (GraphSummary.GraphPanes.FirstOrDefault() is RTReplicateGraphPane ||
         RTLinearRegressionGraphPane.ShowReplicate == ReplicateDisplay.single)
     {
         GraphSummary.UpdateUI();
     }
 }
コード例 #16
0
 public DetectionsToolbar(GraphSummary graphSummary) : base(graphSummary)
 {
     InitializeComponent();
     _timer = new Timer {
         Interval = 100
     };
     _timer.Tick += Timer_OnTick;
 }
コード例 #17
0
 private TextObj AddLabel(string text, double x, double y, Color color)
 {
     return(new TextObj(text, x, y, CoordType.AxisXYScale, AlignH.Center, AlignV.Bottom)
     {
         FontSpec = GraphSummary.CreateFontSpec(color),
         IsClippedToChartRect = true
     });
 }
コード例 #18
0
ファイル: RTGraphController.cs プロジェクト: mdcallah/pwiz
        public void OnActiveLibraryChanged()
        {
            var fod = GraphSummary.GraphPanes.FirstOrDefault() as IUpdateGraphPaneController;

            if (fod != null && fod.UpdateUIOnLibraryChanged())
            {
                GraphSummary.UpdateUI();
            }
        }
コード例 #19
0
ファイル: RTGraphController.cs プロジェクト: mdcallah/pwiz
        public void OnResultsIndexChanged()
        {
            var fod = GraphSummary.GraphPanes.FirstOrDefault() as IUpdateGraphPaneController;

            if (fod != null && fod.UpdateUIOnIndexChanged())
            {
                GraphSummary.UpdateUI();
            }
        }
コード例 #20
0
        public RTScheduleGraphPane(GraphSummary graphSummary, bool isExportMethodDlg = false)
            : base(graphSummary)
        {
            _exportMethodDlg = isExportMethodDlg;

            XAxis.Title.Text    = Resources.RTScheduleGraphPane_RTScheduleGraphPane_Scheduled_Time;
            YAxis.Scale.MinAuto = false;
            YAxis.Scale.Min     = 0;
        }
コード例 #21
0
        public void SetSelectedFile(string file)
        {
            var group = _replicateGroups?.FirstOrDefault(g => (g.FileInfo != null && g.FileInfo.FilePath.GetFileName() == file) || (g.FileInfo == null && file == null));

            if (group != null)
            {
                SelectedGroup = group;
                GraphSummary.UpdateUI();
            }
        }
コード例 #22
0
        public override void Draw(Graphics g)
        {
            GraphObjList.Clear();

            if (_graphData != null)
            {
                // Force Axes to recalculate to ensure proper layout of labels
                AxisChange(g);

                // Reposition the regression label.
                RectangleF rectChart = Chart.Rect;
                PointF     ptTop     = rectChart.Location;

                // Setup axes scales to enable the ReverseTransform method
                XAxis.Scale.SetupScaleData(this, XAxis);
                YAxis.Scale.SetupScaleData(this, YAxis);

                float    yNext    = ptTop.Y;
                double   left     = XAxis.Scale.ReverseTransform(ptTop.X + 8);
                FontSpec fontSpec = GraphSummary.CreateFontSpec(COLOR_LINE_REGRESSION);
                if (_labelRegression != null)
                {
                    // Add regression text
                    double  top  = YAxis.Scale.ReverseTransform(yNext);
                    TextObj text = new TextObj(_labelRegression, left, top,
                                               CoordType.AxisXYScale, AlignH.Left, AlignV.Top)
                    {
                        IsClippedToChartRect = true,
                        ZOrder   = ZOrder.E_BehindCurves,
                        FontSpec = fontSpec,
                    };
                    //                text.FontSpec.Size = 12;
                    GraphObjList.Add(text);
                }

                if (_labelRegressionCurrent != null)
                {
                    // Add text for current regression
                    SizeF sizeLabel = fontSpec.MeasureString(g, _labelRegression, CalcScaleFactor());
                    yNext += sizeLabel.Height + 3;
                    double  top  = YAxis.Scale.ReverseTransform(yNext);
                    TextObj text = new TextObj(_labelRegressionCurrent, left, top,
                                               CoordType.AxisXYScale, AlignH.Left, AlignV.Top)
                    {
                        IsClippedToChartRect = true,
                        ZOrder   = ZOrder.E_BehindCurves,
                        FontSpec = GraphSummary.CreateFontSpec(COLOR_LINE_REGRESSION_CURRENT),
                    };
//                    text.FontSpec.Size = 12;
                    GraphObjList.Add(text);
                }
            }

            base.Draw(g);
        }
コード例 #23
0
 protected SummaryPeptideGraphPane(GraphSummary graphSummary, PaneKey paneKey)
     : base(graphSummary)
 {
     PaneKey = paneKey;
     string xAxisTitle = Resources.SummaryPeptideGraphPane_SummaryPeptideGraphPane_Peptide;
     if (null != paneKey.IsotopeLabelType && !paneKey.IsotopeLabelType.IsLight)
     {
         xAxisTitle += " (" + paneKey.IsotopeLabelType + ")"; // Not L10N
     }
     XAxis.Title.Text = xAxisTitle;
     XAxis.Type = AxisType.Text;
 }
コード例 #24
0
        protected SummaryPeptideGraphPane(GraphSummary graphSummary, PaneKey paneKey)
            : base(graphSummary)
        {
            PaneKey = paneKey;
            string xAxisTitle = Resources.SummaryPeptideGraphPane_SummaryPeptideGraphPane_Peptide;

            if (null != paneKey.IsotopeLabelType && !paneKey.IsotopeLabelType.IsLight)
            {
                xAxisTitle += @" (" + paneKey.IsotopeLabelType + @")";
            }
            XAxis.Title.Text = xAxisTitle;
            XAxis.Type       = AxisType.Text;
        }
コード例 #25
0
ファイル: AreaCVToolbar.cs プロジェクト: laeubisoft/pwiz
        public AreaCVToolbar(GraphSummary graphSummary) :
            base(graphSummary)
        {
            InitializeComponent();

            toolStripNumericDetections.NumericUpDownControl.ValueChanged += NumericUpDownControl_ValueChanged;
            toolStripComboGroup.SelectedIndexChanged += toolStripComboGroup_SelectedIndexChanged;

            _timer = new Timer
            {
                Interval = 100
            };
            _timer.Tick += timer_Tick;
        }
コード例 #26
0
        private void RTScoreCalculatorList_ListChanged(object sender, EventArgs e)
        {
            // Avoid updating on every minor change to the list.
            if (_pendingUpdate)
            {
                return;
            }

            // Wait for the UI thread to become available again, and then update
            if (GraphSummary.IsHandleCreated)
            {
                GraphSummary.BeginInvoke(new Action(DelayedUpdate));
                _pendingUpdate = true;
            }
        }
コード例 #27
0
        protected SummaryPeptideGraphPane(GraphSummary graphSummary, PaneKey paneKey)
            : base(graphSummary)
        {
            PaneKey = paneKey;
            string xAxisTitle =
                Helpers.PeptideToMoleculeTextMapper.Translate(Resources.SummaryPeptideGraphPane_SummaryPeptideGraphPane_Peptide,
                                                              graphSummary.DocumentUIContainer.DocumentUI.DocumentType);

            if (null != paneKey.IsotopeLabelType && !paneKey.IsotopeLabelType.IsLight)
            {
                xAxisTitle += @" (" + paneKey.IsotopeLabelType + @")";
            }
            XAxis.Title.Text = xAxisTitle;
            XAxis.Type       = AxisType.Text;
        }
コード例 #28
0
        protected void ChangeSelectedIndex(int iResult)
        {
            if (iResult < 0)
            {
                return;
            }
            var document = GraphSummary.DocumentUIContainer.DocumentUI;

            if (!document.Settings.HasResults || iResult >= document.Settings.MeasuredResults.Chromatograms.Count)
            {
                return;
            }
            GraphSummary.StateProvider.SelectedResultsIndex = iResult;
            GraphSummary.Focus();
        }
コード例 #29
0
ファイル: DetectionsPlotPane.cs プロジェクト: laeubisoft/pwiz
        protected DetectionsPlotPane(GraphSummary graphSummary) : base(graphSummary)
        {
            MaxRepCount = graphSummary.DocumentUIContainer.DocumentUI.MeasuredResults.Chromatograms.Count;

            Settings.RepCount = MaxRepCount / 2;
            if (GraphSummary.Toolbar is DetectionsToolbar toolbar)
            {
                toolbar.UpdateUI();
            }

            XAxis.Scale.Min     = YAxis.Scale.Min = 0;
            XAxis.Scale.MinAuto = XAxis.Scale.MaxAuto = YAxis.Scale.MinAuto = YAxis.Scale.MaxAuto = false;
            ToolTip             = new ToolTipImplementation(this);

            DetectionPlotData.GetDataCache().ReportProgress += UpdateProgressHandler;
            DetectionPlotData.GetDataCache().StatusChange   += UpdateStatusHandler;
        }
コード例 #30
0
        public void OnUpdateGraph()
        {
            // CONSIDER: Need a better guarantee that this ratio index matches the
            //           one in the sequence tree, but at least this will keep the UI
            //           from crashing with IndexOutOfBoundsException.
            var settings = GraphSummary.DocumentUIContainer.DocumentUI.Settings;

            GraphSummary.NormalizeOption = NormalizeOption.Constrain(settings, GraphSummary.NormalizeOption);

            var pane = GraphSummary.GraphPanes.FirstOrDefault();

            switch (GraphSummary.Type)
            {
            case GraphTypeSummary.replicate:
            case GraphTypeSummary.peptide:
                GraphSummary.DoUpdateGraph(this, GraphSummary.Type);
                break;

            case GraphTypeSummary.histogram:
                if (!(pane is AreaCVHistogramGraphPane))
                {
                    GraphSummary.GraphPanes = new[] { new AreaCVHistogramGraphPane(GraphSummary) }
                }
                ;
                break;

            case GraphTypeSummary.histogram2d:
                if (!(pane is AreaCVHistogram2DGraphPane))
                {
                    GraphSummary.GraphPanes = new[] { new AreaCVHistogram2DGraphPane(GraphSummary) }
                }
                ;
                break;
            }

            if (!ReferenceEquals(GraphSummary.GraphPanes.FirstOrDefault(), pane))
            {
                var disposable = pane as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
コード例 #31
0
        protected SummaryGraphPane(GraphSummary graphSummary)
        {
            GraphSummary = graphSummary;
            PaneKey = PaneKey.DEFAULT;
            Border.IsVisible = false;
            Title.IsVisible = true;

            Chart.Border.IsVisible = false;
            XAxis.Scale.MaxAuto = true;
            YAxis.Scale.MaxAuto = true;
            Y2Axis.IsVisible = false;
            X2Axis.IsVisible = false;
            XAxis.MajorTic.IsOpposite = false;
            YAxis.MajorTic.IsOpposite = false;
            XAxis.MinorTic.IsOpposite = false;
            YAxis.MinorTic.IsOpposite = false;
            IsFontsScaled = false;
            YAxis.Scale.MaxGrace = 0.1;
        }
コード例 #32
0
        protected SummaryGraphPane(GraphSummary graphSummary)
        {
            GraphSummary     = graphSummary;
            PaneKey          = PaneKey.DEFAULT;
            Border.IsVisible = false;
            Title.IsVisible  = true;

            Chart.Border.IsVisible    = false;
            XAxis.Scale.MaxAuto       = true;
            YAxis.Scale.MaxAuto       = true;
            Y2Axis.IsVisible          = false;
            X2Axis.IsVisible          = false;
            XAxis.MajorTic.IsOpposite = false;
            YAxis.MajorTic.IsOpposite = false;
            XAxis.MinorTic.IsOpposite = false;
            YAxis.MinorTic.IsOpposite = false;
            IsFontsScaled             = false;
            YAxis.Scale.MaxGrace      = 0.1;
        }
コード例 #33
0
        private void AddLabels(Graphics g)
        {
            if (_areaCVGraphData == null)
            {
                Title.Text = Resources.AreaCVHistogramGraphPane_AddLabels_Calculating____;
            }
            else if (!_areaCVGraphData.IsValid)
            {
                Title.Text = Resources.AreaCVHistogramGraphPane_AddLabels_Not_enough_data;
            }
            else
            {
                Title.Text = string.Empty;

                var unit   = _percentage ? @"%" : string.Empty;
                var factor = _percentage ? 100.0 : 1.0;

                var scaleFactor = CalcScaleFactor();
                var fontHeight  = GraphSummary.CreateFontSpec(Color.Black).GetHeight(scaleFactor);
                var height      = PaneHeightToYValue(fontHeight);
                // Anchor labels at top of graph pane
                var y = Math.Min(PaneHeightToYValue(Rect.Height - TitleGap * Title.FontSpec.GetHeight(scaleFactor) - fontHeight * _stickItems.Count), _areaCVGraphData.MaxFrequency + height);

                var index = 0;
                if (Settings.Default.AreaCVShowMedianCV)
                {
                    _stickItems[index++].Points[1].Y = y;
                    string text = string.Format(Resources.AreaCVHistogramGraphPane_AddLabels_Median___0_,
                                                HistogramHelper.FormatDouble(_areaCVGraphData.MedianCV * factor, _decimals) + unit);
                    GraphObjList.Add(AddLabel(text, _areaCVGraphData.MedianCV * factor, y, Color.Blue));
                    y += height;
                }

                if (Settings.Default.AreaCVShowCVCutoff)
                {
                    _stickItems[index++].Points[1].Y = y;
                    string text = string.Format(Resources.AreaCVHistogramGraphPane_UpdateGraph_Below__0____1_,
                                                Settings.Default.AreaCVCVCutoff + unit, HistogramHelper.FormatDouble(_areaCVGraphData.BelowCVCutoff * factor, _decimals) + unit);
                    GraphObjList.Add(AddLabel(text, Settings.Default.AreaCVCVCutoff, y, Color.Red));
                }
            }
        }
コード例 #34
0
 public AreaReplicateGraphPane(GraphSummary graphSummary, PaneKey paneKey)
     : base(graphSummary)
 {
     PaneKey = paneKey;
 }
コード例 #35
0
 protected SummaryBarGraphPaneBase(GraphSummary graphSummary)
     : base(graphSummary)
 {
     _axisLabelScaler = new AxisLabelScaler(this);
 }
コード例 #36
0
        public RTLinearRegressionGraphPane(GraphSummary graphSummary)
            : base(graphSummary)
        {
            XAxis.Title.Text = Resources.RTLinearRegressionGraphPane_RTLinearRegressionGraphPane_Score;

            Settings.Default.RTScoreCalculatorList.ListChanged += RTScoreCalculatorList_ListChanged;
        }
コード例 #37
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
 private GraphSummary CreateGraphPeakArea()
 {
     _graphPeakArea = new GraphSummary(this, new AreaGraphController())
                          {
                              TabText = Resources.SkylineWindow_CreateGraphPeakArea_Peak_Areas,
                              ResultsIndex = SelectedResultsIndex
                          };
     _graphPeakArea.FormClosed += graphPeakArea_FormClosed;
     _graphPeakArea.VisibleChanged += graphPeakArea_VisibleChanged;
     return _graphPeakArea;
 }
コード例 #38
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
 void GraphSummary.IStateProvider.BuildGraphMenu(ZedGraphControl zedGraphControl, ContextMenuStrip menuStrip, Point mousePt,
     GraphSummary.IController controller)
 {
     var graphController = controller as RTGraphController;
     if (graphController != null)
         BuildRTGraphMenu(menuStrip, mousePt, graphController);
     else if (controller is AreaGraphController)
         BuildAreaGraphMenu(menuStrip);
     CopyEmfToolStripMenuItem.AddToContextMenu(zedGraphControl, menuStrip);
 }
コード例 #39
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
        private void graphRetentionTime_FormClosed(object sender, FormClosedEventArgs e)
        {
            // Update settings and menu check
            Settings.Default.ShowRetentionTimeGraph = false;

            _graphRetentionTime = null;
        }
コード例 #40
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
        private void graphPeakArea_FormClosed(object sender, FormClosedEventArgs e)
        {
            // Update settings and menu check
            Settings.Default.ShowPeakAreaGraph = false;

            _graphPeakArea = null;
        }
コード例 #41
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
 private void DestroyGraphRetentionTime()
 {
     if (_graphRetentionTime != null)
     {
         _graphRetentionTime.FormClosed -= graphRetentionTime_FormClosed;
         _graphRetentionTime.VisibleChanged -= graphRetentionTime_VisibleChanged;
         _graphRetentionTime.HideOnClose = false;
         _graphRetentionTime.Close();
         _graphRetentionTime = null;
     }
 }
コード例 #42
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
 private void DestroyGraphPeakArea()
 {
     if (_graphPeakArea != null)
     {
         _graphPeakArea.FormClosed -= graphPeakArea_FormClosed;
         _graphPeakArea.VisibleChanged -= graphPeakArea_VisibleChanged;
         _graphPeakArea.HideOnClose = false;
         _graphPeakArea.Close();
         _graphPeakArea = null;
     }
 }
コード例 #43
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
 private GraphSummary CreateGraphRetentionTime()
 {
     _graphRetentionTime = new GraphSummary(this, new RTGraphController())
                               {
                                   TabText = Resources.SkylineWindow_CreateGraphRetentionTime_Retention_Times,
                                   ResultsIndex = SelectedResultsIndex
                               };
     _graphRetentionTime.FormClosed += graphRetentionTime_FormClosed;
     _graphRetentionTime.VisibleChanged += graphRetentionTime_VisibleChanged;
     return _graphRetentionTime;
 }
コード例 #44
0
 public RTPeptideGraphPane(GraphSummary graphSummary)
     : base(graphSummary, PaneKey.DEFAULT)
 {
 }
コード例 #45
0
 public AreaPeptideGraphPane(GraphSummary graphSummary, PaneKey paneKey)
     : base(graphSummary, paneKey)
 {
 }
コード例 #46
0
ファイル: SkylineGraphs.cs プロジェクト: lgatto/proteowizard
        public void ShowGraphRetentionTime(bool show)
        {
            if (show)
            {
                if (_graphRetentionTime != null && !Program.SkylineOffscreen)
                {
                    _graphRetentionTime.Activate();
                }
                else
                {
                    _graphRetentionTime = _graphRetentionTime ?? CreateGraphRetentionTime();

                    // Choose a position to float the window
                    var rectFloat = GetFloatingRectangleForNewWindow();
                    _graphRetentionTime.Show(dockPanel, rectFloat);
                }
            }
            else if (_graphRetentionTime != null)
            {
                // Save current setting for showing spectra
                show = Settings.Default.ShowRetentionTimeGraph;
                // Close the spectrum graph window
                _graphRetentionTime.Hide();
                // Restore setting and menuitem from saved value
                Settings.Default.ShowRetentionTimeGraph = show;
            }
        }