// ************************************ create_control_graphic

        /// <summary>
        /// deletes any existing control graphic and then creates a
        /// new one
        /// </summary>
        /// <summary>
        /// Creates the control graphic.
        /// </summary>
        void create_control_graphic()
        {
            Rectangle bounding_rectangle;

            if (control_graphic != null)
            {
                control_graphic =
                    control_graphic.DeleteGraphicsBuffer();
            }

            control_graphic = new IndeterminateProgressGraphicsBuffer();

            if (control_graphic.CreateGraphicsBuffer(
                    this.CreateGraphics(),
                    ControlWidthHeight,
                    ControlWidthHeight))
            {
                control_graphic.g.SmoothingMode =
                    Smoothing;
                control_graphic.g.TextRenderingHint = TextRendering;
                bounding_rectangle = this.ClientRectangle;
                bounding_rectangle.Inflate(1, 1);
                control_graphic.g.FillRectangle(
                    new SolidBrush(BackgroundColor),
                    bounding_rectangle);
                bounding_rectangle.Inflate(-1, -1);
            }
        }
        // ****************************** memory_cleanup event handler

        /// <summary>
        /// Handles the cleanup event of the memory control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void memory_cleanup(object sender,
                                    EventArgs e)
        {
            if (control_graphic != null)
            {
                control_graphic =
                    control_graphic.DeleteGraphicsBuffer();
            }

            if (indicator_graphic != null)
            {
                indicator_graphic =
                    indicator_graphic.DeleteGraphicsBuffer();
            }
        }
        // ********************************** create_indicator_graphic

        /// <summary>
        /// this method creates a new indicator graphic that is the
        /// size of the control graphic; it rotates clockwise around
        /// the center of the control graphic; the indicator graphic
        /// initially has its leading edge at the x-axis; any existing
        /// indicator graphic will be deleted
        /// </summary>
        /// <summary>
        /// Creates the indicator graphic.
        /// </summary>
        void create_indicator_graphic()
        {
            // effectively erases the
            // background
            if (control_graphic == null)
            {
                create_control_graphic();
            }

            if (indicator_graphic != null)
            {
                indicator_graphic =
                    indicator_graphic.DeleteGraphicsBuffer();
            }

            //Subject to be deleted  -- Experimental
            //ControlWidthHeight = (Width / 2) + (Height / 2);


            indicator_graphic = new IndeterminateProgressGraphicsBuffer();

            update_indicator_geometry();

            if (indicator_graphic.CreateGraphicsBuffer(
                    this.CreateGraphics(),
                    ControlWidthHeight,
                    ControlWidthHeight))
            {
                Color     color    = IndicatorColor;
                Graphics  graphics = indicator_graphic.g;
                Rectangle indicator_bounding_rectangle;
                Size      size = new Size((int)(2.0F * r),
                                          (int)(2.0F * r));

                indicator_graphic.g.SmoothingMode =
                    Smoothing;
                indicator_graphic.g.TextRenderingHint = TextRendering;
                indicator_bounding_rectangle          = this.ClientRectangle;
                indicator_graphic.g.FillRectangle(
                    new SolidBrush(Color.Transparent),
                    indicator_bounding_rectangle);
                for (int i = 0; (i < CirclesCount); i++)
                {
                    float     angle;
                    Rectangle bounding_rectangle;
                    Brush     brush    = new SolidBrush(color);
                    Point     top_left = new Point();
                    int       x;
                    int       y;

                    angle = (phi + (float)i * theta) +
                            indicator_angle;
                    polar_to_cartesian(R,
                                       angle,
                                       out x,
                                       out y);
                    top_left.X = (int)((float)x - r) +
                                 this.Width / 2;
                    top_left.Y = (int)((float)y - r) +
                                 this.Height / 2;

                    bounding_rectangle = new Rectangle(top_left,
                                                       size);
                    graphics.FillEllipse(brush,
                                         bounding_rectangle);

                    brush.Dispose();

                    color = lighter_color(color, 0.25F);
                }
            }
        }