Exemplo n.º 1
0
    // Token: 0x0600009C RID: 156 RVA: 0x00005778 File Offset: 0x00003978
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        Bitmap   bitmap   = GControl2.smethod_11(GControl2.smethod_9(this), GControl2.smethod_10(this));
        Graphics graphics = GControl2.smethod_12(bitmap);

        this.int_0 = GControl2.smethod_9(this) - 1;
        this.int_1 = GControl2.smethod_10(this) - 1;
        Rectangle rectangle = new Rectangle(0, 2, GControl2.smethod_10(this) - 5, GControl2.smethod_10(this) - 5);
        Graphics  graphics2 = graphics;

        GControl2.smethod_13(graphics2, SmoothingMode.HighQuality);
        GControl2.smethod_14(graphics2, TextRenderingHint.ClearTypeGridFit);
        GControl2.smethod_16(graphics2, GControl2.smethod_15(this));
        GControl2.GEnum1 genum = this.genum1_0;
        if (genum != GControl2.GEnum1.Style1)
        {
            if (genum == GControl2.GEnum1.Style2)
            {
                graphics2.FillRectangle(new SolidBrush(this.color_0), rectangle);
                GEnum5 genum2 = this.genum5_0;
                if (genum2 == GEnum5.Over)
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rectangle);
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rectangle);
                }
                else if (genum2 == GEnum5.Down)
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rectangle);
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rectangle);
                }
                if (this.Boolean_0)
                {
                    graphics2.DrawString("ü", new Font("Wingdings", 18f), new SolidBrush(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
                }
                if (!base.Enabled)
                {
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rectangle);
                    graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(48, 119, 91)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
                }
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
        }
        else
        {
            GControl2.smethod_18(graphics2, GControl2.smethod_17(this.color_0), rectangle);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 == GEnum5.Over)
            {
                GControl2.smethod_20(graphics2, GControl2.smethod_19(this.color_2), rectangle);
            }
            else if (genum2 == GEnum5.Down)
            {
                GControl2.smethod_20(graphics2, GControl2.smethod_19(this.color_2), rectangle);
            }
            if (this.Boolean_0)
            {
                graphics2.DrawString("ü", GControl2.smethod_7("Wingdings", 18f), GControl2.smethod_17(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
            }
            if (!base.Enabled)
            {
                graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rectangle);
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(140, 142, 143)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
            graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Exemplo n.º 2
0
    // Token: 0x06000078 RID: 120 RVA: 0x0025D26C File Offset: 0x0025B46C
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        Bitmap   bitmap   = new Bitmap(base.Width, base.Height);
        Graphics graphics = Graphics.FromImage(bitmap);

        this.int_0 = base.Width - 1;
        this.int_1 = base.Height - 1;
        Rectangle rect      = new Rectangle(0, 2, base.Height - 5, base.Height - 5);
        Graphics  graphics2 = graphics;

        graphics2.SmoothingMode     = SmoothingMode.HighQuality;
        graphics2.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
        graphics2.Clear(this.BackColor);
        GControl2.GEnum1 genum = this.genum1_0;
        if (genum != GControl2.GEnum1.Style1)
        {
            if (genum == GControl2.GEnum1.Style2)
            {
                graphics2.FillRectangle(new SolidBrush(this.color_0), rect);
                GEnum5 genum2 = this.genum5_0;
                if (genum2 != GEnum5.Over)
                {
                    if (genum2 == GEnum5.Down)
                    {
                        graphics2.DrawRectangle(new Pen(this.color_2), rect);
                        graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rect);
                    }
                }
                else
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rect);
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rect);
                }
                if (this.Boolean_0)
                {
                    graphics2.DrawString("ü", new Font("Wingdings", 18f), new SolidBrush(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
                }
                if (!base.Enabled)
                {
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rect);
                    graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(48, 119, 91)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
                }
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
        }
        else
        {
            graphics2.FillRectangle(new SolidBrush(this.color_0), rect);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 != GEnum5.Over)
            {
                if (genum2 == GEnum5.Down)
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rect);
                }
            }
            else
            {
                graphics2.DrawRectangle(new Pen(this.color_2), rect);
            }
            if (this.Boolean_0)
            {
                graphics2.DrawString("ü", new Font("Wingdings", 18f), new SolidBrush(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
            }
            if (!base.Enabled)
            {
                graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rect);
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(140, 142, 143)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
            graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }