Skybound.Gecko.GeckoWebBrowser.OnPaint C# (CSharp) Méthode

OnPaint() protected méthode

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void
        protected override void OnPaint(PaintEventArgs e)
        {
            if (this.DesignMode)
            {
                string versionString = ((AssemblyFileVersionAttribute)Attribute.GetCustomAttribute(GetType().Assembly, typeof(AssemblyFileVersionAttribute))).Version;
                string copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(GetType().Assembly, typeof(AssemblyCopyrightAttribute))).Copyright;

                using (Brush brush = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.SolidDiamond, Color.FromArgb(240, 240, 240), Color.White))
                    e.Graphics.FillRectangle(brush, this.ClientRectangle);

                e.Graphics.DrawString("Skybound GeckoFX v" + versionString + "\r\n" + copyright + "\r\n" + "http://www.geckofx.org", SystemFonts.MessageBoxFont, Brushes.Black,
                    new RectangleF(2, 2, this.Width-4, this.Height-4));
                e.Graphics.DrawRectangle(SystemPens.ControlDark, 0, 0, Width-1, Height-1);
            }
            base.OnPaint(e);
        }