Esempio n. 1
0
        internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds)
        {
            base.PrintToMetaFileRecursive(hDC, lParam, bounds);

            using (WindowsFormsUtils.DCMapping mapping = new WindowsFormsUtils.DCMapping(hDC, bounds)) {
                using (Graphics g = Graphics.FromHdcInternal(hDC.Handle)) {
                    ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
                }
            }
        }
Esempio n. 2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            var g = e.Graphics;

            var image = Image;

            if (image != null) // TODO: Animate image.
            {
                g.DrawImage(image, 0, 0, image.Width, image.Height);
            }

            ControlPaint.PrintBorder(g, ClientRectangle, borderStyle, Border3DStyle.Sunken);

            base.OnPaint(e);
        }
Esempio n. 3
0
        protected override void OnPaint(PaintEventArgs e)
        {
            var g = e.Graphics;
            var p = Padding;
            var w = Width;
            var h = Height;

            if (adjustSize)
            {
                var size = g.MeasureString(Text, Font);
                Size       = new Size((int)size.Width + p.Horizontal, (int)size.Height + p.Vertical);
                adjustSize = false;
            }

            g.uwfFillRectangle(BackColor, 0, 0, w, h);
            g.uwfDrawString(Text, Font, ForeColor, p.Left, p.Top, w - p.Horizontal, h - p.Vertical, TextAlign);

            ControlPaint.PrintBorder(g, ClientRectangle, BorderStyle, Border3DStyle.SunkenOuter);
        }
Esempio n. 4
0
 protected override void OnPaint(PaintEventArgs e)
 {
     ControlPaint.PrintBorder(e.Graphics, ClientRectangle, BorderStyle, Border3DStyle.Sunken);
 }
Esempio n. 5
0
 protected internal override void uwfOnLatePaint(PaintEventArgs e)
 {
     ControlPaint.PrintBorder(e.Graphics, ClientRectangle, BorderStyle, Border3DStyle.Flat);
 }