CodeTV.LogoEditor.PaintValue C# (CSharp) Method

PaintValue() public method

public PaintValue ( System.Drawing.Design.PaintValueEventArgs e ) : void
e System.Drawing.Design.PaintValueEventArgs
return void
        public override void PaintValue(PaintValueEventArgs e)
        {
            Graphics G = e.Graphics;

            if (e.Value != null)
            {
                string logoFilename = FileUtils.GetAbsolutePath(e.Value as string);
                if (logoFilename != null && File.Exists(logoFilename))
                {
                    Image logo = Image.FromFile(logoFilename);
                    if (logo != null)
                    {
                        G.DrawImage(logo, e.Bounds);
                        logo.Dispose();
                    }
                }
            }

            G.DrawRectangle(Pens.Black, e.Bounds);
        }