/// <summary>
        /// Method to draw the graph for both Predicted and Assessed Navigation Acc.
        /// </summary>
        /// <param name="navAccGraphData">The appropriate data structure (Assessed or Predicted)</param>
        /// <param name="color">The color which we want to draw the graph</param>
        /// <param name="selected">Do we want to draw this or not, based on user selection</param>
        /// <param name="legend">The string to be used to represent the legend</param>
        private void DisplayNavAccGraph(PointPairList navAccGraphData, Color color, bool selected, string legend)
        {
            // Update the Accuracy graph using the PointPairList array.
            GraphPane myPane = NavAccGraph.GraphPane;

            if (selected)
            {
                // use the AddCurve method to add a new series of data to an existing graph
                // The text supplied in the first parameter will be used in the legend.
                LineItem myCurve = myPane.AddCurve(legend, navAccGraphData, color, SymbolType.Circle);
                // Fill the symbols with the same color as the lines
                myCurve.Symbol.Fill = new Fill(color);
            }

            // update the X-Axis Min and Max values. XDate is a ZedGraph type that takes a .Net DateTime structure.
            // Use the JulianDate method ToDateTime to retrieve this structure from a JulianDate
            NavAccGraph.GraphPane.XAxis.Scale.Min = (double)new XDate(startjd.ToDateTime());
            NavAccGraph.GraphPane.XAxis.Scale.Max = (double)new XDate(stopjd.ToDateTime());

            // Show the x axis grid
            myPane.XAxis.MajorGrid.IsVisible = true;

            // make x-axis a date type
            myPane.XAxis.Type = AxisType.Date;

            // Custom Axis string for display
            myPane.XAxis.Scale.Format = "dd-MMM\nhh:mm";

            // set the X-Axis Title
            if (GPSTimeRadio.Checked)
            {
                myPane.XAxis.Title.Text = Localization.TimeGPST;
            }
            else
            {
                myPane.XAxis.Title.Text = Localization.TimeUTC;
            }

            // Align the Y axis labels so they are flush to the axis
            myPane.YAxis.Scale.Align = AlignP.Inside;

            // Fill the axis background with a gradient
            myPane.Chart.Fill = new Fill(Color.White, Color.LightGray, 45.0f);

            // Enable scrollbars if needed
            NavAccGraph.IsShowHScrollBar  = true;
            NavAccGraph.IsShowVScrollBar  = true;
            NavAccGraph.IsAutoScrollRange = true;
            NavAccGraph.IsScrollY2        = true;

            // Make sure the Graph gets redrawn
            NavAccGraph.AxisChange();
            NavAccGraph.Invalidate();
        }
        /// <summary>
        /// Removes the receiver definition and clears the graphs
        /// </summary>
        private void OnDeleteReceiverClick(object sender, EventArgs e)
        {
            // when a receiver is deleted, we need to clear the graphs and delete the information in the tree
            // to delete info from a graph, just clear the graphs's curvelist
            DOPGraph.GraphPane.CurveList.Clear();
            AzElGraph.GraphPane.CurveList.Clear();
            NavAccGraph.GraphPane.CurveList.Clear();

            // also, we need to clear all the data from the DOPData structure
            foreach (PointPairList ppl in DOPData)
            {
                ppl.Clear();
            }

            // clear all the Azimuth / elevation data from their respective structures.
            AzElData_TimeBased.Clear();
            AzElData_AzimuthBased.Clear();

            // Clear all the Nav Accuracy Data from the zedGraph data structure that contain them.
            AsAccData.Clear();
            PredAccData.Clear();

            // always do these two steps, these make the graphs update themselves
            DOPGraph.AxisChange();
            DOPGraph.Invalidate();

            AzElGraph.AxisChange();
            AzElGraph.Invalidate();

            NavAccGraph.AxisChange();
            NavAccGraph.Invalidate();

            // Now clear the tree of the receiver, PSF and PAF  information
            // Except for the first node (Almanac), remove all other nodes.
            string firstNodeName = rootNode.FirstNode.Text;

            rootNode.Nodes.Clear();
            TreeNode newNode = new TreeNode(firstNodeName);

            rootNode.Nodes.Add(newNode);
            rootNode.Expand();

            //Clear the textboxes that contain the PAF and PSF names.
            PAFName.Clear();
            PSFName.Clear();

            //enable and disable the appropriate buttons
            SetControlStates(false);
        }