示例#1
0
文件: Overlay.cs 项目: vorov2/slot
        protected override void OnPaint(PaintEventArgs e)
        {
            var g      = e.Graphics;
            var ratioX = Dpi.GetWidth(1);
            var ratioY = Dpi.GetHeight(1);

            g.FillRectangle(BorderColor.Brush(), new Rectangle(0, 0, Width, Height));
            g.FillRectangle(BackgroundColor.Brush(), new Rectangle(ratioX, ratioY,
                                                                   Width - ratioX * 2, Height - ratioY * 2));
        }