Пример #1
0
 // Token: 0x060002B6 RID: 694 RVA: 0x000081B4 File Offset: 0x000063B4
 public GControl14()
 {
     base.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
     this.DoubleBuffered = true;
     GControl14.smethod_1(this, Color.FromArgb(60, 70, 73));
     GControl14.smethod_3(this, GControl14.smethod_2("Segoe UI", 10f));
     GControl14.smethod_4(this, TabSizeMode.Fixed);
     base.ItemSize = new Size(120, 40);
 }
Пример #2
0
    // Token: 0x060002B7 RID: 695 RVA: 0x00008244 File Offset: 0x00006444
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        Bitmap   bitmap   = GControl14.smethod_7(GControl14.smethod_5(this), GControl14.smethod_6(this));
        Graphics graphics = GControl14.smethod_8(bitmap);

        this.int_0 = GControl14.smethod_5(this) - 1;
        this.int_1 = GControl14.smethod_6(this) - 1;
        Graphics graphics2 = graphics;

        GControl14.smethod_9(graphics2, SmoothingMode.HighQuality);
        GControl14.smethod_10(graphics2, PixelOffsetMode.HighQuality);
        GControl14.smethod_11(graphics2, TextRenderingHint.ClearTypeGridFit);
        GControl14.smethod_12(graphics2, this.color_1);
        try
        {
            GControl14.smethod_1(GControl14.smethod_13(this), this.color_0);
        }
        catch
        {
        }
        for (int i = 0; i <= base.TabCount - 1; i++)
        {
            Rectangle rectangle  = new Rectangle(new Point(GControl14.smethod_14(this, i).Location.X + 2, base.GetTabRect(i).Location.Y), new Size(base.GetTabRect(i).Width, base.GetTabRect(i).Height));
            Rectangle rectangle2 = new Rectangle(rectangle.Location, new Size(rectangle.Width, rectangle.Height));
            if (i == base.SelectedIndex)
            {
                graphics2.FillRectangle(new SolidBrush(this.color_1), rectangle2);
                graphics2.FillRectangle(new SolidBrush(this.color_2), rectangle2);
                if (base.ImageList != null)
                {
                    try
                    {
                        if (base.ImageList.Images[base.TabPages[i].ImageIndex] != null)
                        {
                            graphics2.DrawImage(base.ImageList.Images[base.TabPages[i].ImageIndex], new Point(rectangle2.Location.X + 8, rectangle2.Location.Y + 6));
                            graphics2.DrawString("      " + base.TabPages[i].Text, this.Font, Brushes.White, rectangle2, GClass6.stringFormat_1);
                        }
                        else
                        {
                            graphics2.DrawString(base.TabPages[i].Text, this.Font, Brushes.White, rectangle2, GClass6.stringFormat_1);
                        }
                        goto IL_3D8;
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                }
                graphics2.DrawString(base.TabPages[i].Text, this.Font, Brushes.White, rectangle2, GClass6.stringFormat_1);
            }
            else
            {
                graphics2.FillRectangle(new SolidBrush(this.color_1), rectangle2);
                if (base.ImageList != null)
                {
                    try
                    {
                        if (base.ImageList.Images[base.TabPages[i].ImageIndex] != null)
                        {
                            graphics2.DrawImage(base.ImageList.Images[base.TabPages[i].ImageIndex], new Point(rectangle2.Location.X + 8, rectangle2.Location.Y + 6));
                            graphics2.DrawString("      " + base.TabPages[i].Text, this.Font, new SolidBrush(Color.White), rectangle2, new StringFormat
                            {
                                LineAlignment = StringAlignment.Center,
                                Alignment     = StringAlignment.Center
                            });
                        }
                        else
                        {
                            graphics2.DrawString(base.TabPages[i].Text, this.Font, new SolidBrush(Color.White), rectangle2, new StringFormat
                            {
                                LineAlignment = StringAlignment.Center,
                                Alignment     = StringAlignment.Center
                            });
                        }
                        goto IL_3D8;
                    }
                    catch (Exception ex2)
                    {
                        throw new Exception(ex2.Message);
                    }
                }
                graphics2.DrawString(base.TabPages[i].Text, this.Font, new SolidBrush(Color.White), rectangle2, new StringFormat
                {
                    LineAlignment = StringAlignment.Center,
                    Alignment     = StringAlignment.Center
                });
            }
            IL_3D8 :;
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Пример #3
0
 // Token: 0x060002B1 RID: 689 RVA: 0x00003133 File Offset: 0x00001333
 protected virtual void CreateHandle()
 {
     base.CreateHandle();
     GControl14.smethod_0(this, TabAlignment.Top);
 }