Forex_Strategy_Builder.Fancy_Panel.OnPaint C# (CSharp) Метод

OnPaint() защищенный Метод

On Paint
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void
        protected override void OnPaint(PaintEventArgs e)
        {
            Graphics g = e.Graphics;

            // Caption
            Data.GradientPaint(g, rectfCaption, colorCaptionBack, LayoutColors.DepthCaption);
            if (showCaption)
                g.DrawString(caption, fontCaption, brushCaption, rectfCaption, stringFormatCaption);

            g.DrawLine(penBorder, 1, captionHeight, 1, ClientSize.Height);
            g.DrawLine(penBorder, ClientSize.Width - border + 1, captionHeight, ClientSize.Width - border + 1, ClientSize.Height);
            g.DrawLine(penBorder, 0, ClientSize.Height - border + 1, ClientSize.Width, ClientSize.Height - border + 1);

            // Paint the panel background
            RectangleF rectClient = new RectangleF(border, captionHeight, width, height);
            Data.GradientPaint(g, rectClient, LayoutColors.ColorControlBack, LayoutColors.DepthControl);

            return;
        }