Пример #1
0
        protected override void OnPaint(PaintEventArgs e)
        {
            Graphics        dc    = e.Graphics;
            TextFormatFlags flags = TextFormatFlags.Left | TextFormatFlags.EndEllipsis;
            Font            _font = new System.Drawing.Font("Stencil", 10, FontStyle.Regular);



            if (splat == true)
            {
                _georgie.DrawImage(dc);
                _sangre.DrawImage(dc);
            }
            //else draw _mole object
            else
            {
                _georgie.DrawImage(dc);
            }

            _puntuacion.DrawImage(dc);
            _menu.DrawImage(dc);


            TextRenderer.DrawText(e.Graphics, "Disparos :" + _totalShots.ToString(), _font, new Rectangle(0, 22, 120, 20), SystemColors.ControlLightLight, flags);
            TextRenderer.DrawText(e.Graphics, "Aciertos :" + _hits.ToString(), _font, new Rectangle(0, 42, 120, 20), SystemColors.ControlLightLight, flags);
            TextRenderer.DrawText(e.Graphics, "Fallos :" + _misses.ToString(), _font, new Rectangle(0, 62, 120, 20), SystemColors.ControlLightLight, flags);
            TextRenderer.DrawText(e.Graphics, "Punteria :" + _averageHits.ToString("F0") + "%", _font, new Rectangle(0, 82, 120, 20), SystemColors.ControlLightLight, flags);

            base.OnPaint(e);
        }
Пример #2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            Graphics        dc    = e.Graphics;
            TextFormatFlags flags = TextFormatFlags.Right | TextFormatFlags.EndEllipsis;
            Font            _font = new System.Drawing.Font("Century Gothic", 9, FontStyle.Bold);



            if (splat == true)
            {
                _georgie.DrawImage(dc);
                _sangre.DrawImage(dc);
            }
            //else draw _mole object
            else
            {
                _georgie.DrawImage(dc);
            }

            _puntuacion.DrawImage(dc);

            TextRenderer.DrawText(e.Graphics, "Shoots: " + _totalShots.ToString(), _font, new Rectangle(635, 92, 120, 20), SystemColors.ControlText, flags);
            TextRenderer.DrawText(e.Graphics, "Hits: " + _hits.ToString(), _font, new Rectangle(635, 118, 120, 20), SystemColors.ControlText, flags);
            TextRenderer.DrawText(e.Graphics, "Misses: " + _misses.ToString(), _font, new Rectangle(635, 142, 120, 20), SystemColors.ControlText, flags);
            TextRenderer.DrawText(e.Graphics, "Accu: " + _averageHits.ToString("F0") + "%", _font, new Rectangle(635, 166, 120, 20), SystemColors.ControlText, flags);

            base.OnPaint(e);
        }