Esempio n. 1
0
 // Token: 0x060003B3 RID: 947 RVA: 0x00016EC0 File Offset: 0x000150C0
 private void method_1()
 {
     this.Timer_0.Stop();
     GClass14.GEnum7 genum = this.genum7_0;
     if (genum != GClass14.GEnum7.horizontal)
     {
         if (genum == GClass14.GEnum7.vertical)
         {
             this.int_0 = 0;
             if ((double)this.int_1 >= -((double)(checked ((this.list_0.Count + 1) * this.Font.Height)) * 1.3))
             {
                 ref int ptr = ref this.int_1;
                 this.int_1 = checked (ptr - 1);
             }
             else
             {
                 this.int_1 = base.Height;
             }
         }
     }
Esempio n. 2
0
    // Token: 0x060003B1 RID: 945 RVA: 0x00016A10 File Offset: 0x00014C10
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        using (SolidBrush solidBrush = new SolidBrush(this.ForeColor))
        {
            GClass14.GEnum7 genum = this.genum7_0;
            if (genum != GClass14.GEnum7.horizontal)
            {
                if (genum != GClass14.GEnum7.vertical)
                {
                    return;
                }
                this.sizeF_0 = e.Graphics.MeasureString(this.Text, this.Font);
                int num = this.int_1;
                try
                {
                    List <string> .Enumerator enumerator = this.list_0.GetEnumerator();
IL_275:
                    while (enumerator.MoveNext())
                    {
                        string text;
                        for (;;)
                        {
IL_153:
                            text = enumerator.Current;
                            for (;;)
                            {
IL_143:
                                ContentAlignment textAlign = this.TextAlign;
                                if (textAlign > ContentAlignment.MiddleCenter)
                                {
                                    goto Block_12;
                                }
                                for (;;)
                                {
IL_125:
                                    switch (textAlign)
                                    {
                                    case ContentAlignment.TopLeft:
                                        goto IL_192;

                                    case ContentAlignment.TopCenter:
                                        goto IL_1A9;

                                    case (ContentAlignment)3:
                                        goto IL_224;

                                    case ContentAlignment.TopRight:
                                        goto IL_1E2;

                                    default:
                                    {
                                        uint num3;
                                        uint num2 = num3 * 3534347052U ^ 3729251263U;
                                        for (;;)
                                        {
                                            switch ((num3 = (num2 ^ 2784004114U)) % 22U)
                                            {
                                            case 0U:
                                                goto IL_1A9;

                                            case 1U:
                                                num2 = (((textAlign == ContentAlignment.MiddleLeft) ? 3795029050U : 2683898963U) ^ num3 * 3972945967U);
                                                continue;

                                            case 2U:
                                            case 13U:
                                            case 18U:
                                                goto IL_275;

                                            case 3U:
                                                goto IL_192;

                                            case 4U:
                                                goto IL_125;

                                            case 5U:
                                            case 9U:
                                            case 12U:
                                                goto IL_224;

                                            case 6U:
                                                goto IL_167;

                                            case 7U:
                                                goto IL_242;

                                            case 8U:
                                                num2 = (num3 * 2137640444U ^ 513112017U);
                                                continue;

                                            case 10U:
                                                num2 = (((textAlign == ContentAlignment.MiddleCenter) ? 2211913550U : 2576379918U) ^ num3 * 1822409120U);
                                                continue;

                                            case 11U:
                                                goto IL_1E2;

                                            case 14U:
                                                goto IL_184;

                                            case 15U:
                                                goto IL_170;

                                            case 16U:
                                                goto IL_143;

                                            case 19U:
                                                goto IL_15E;

                                            case 20U:
                                                goto IL_153;

                                            case 21U:
                                                goto IL_17E;
                                            }
                                            goto Block_10;
                                        }
                                        break;
                                    }
                                    }
                                }
                            }
                        }
IL_242:
                        checked
                        {
                            num = (int)Math.Round(unchecked ((double)num + (double)e.Graphics.MeasureString(text, this.Font).Height * 1.3));
                            continue;
IL_224:
                            e.Graphics.DrawString(text, this.Font, solidBrush, (float)this.int_0, (float)num);
                            goto IL_242;
Block_10:
                            break;
IL_170:
                            ContentAlignment textAlign;
                            if (textAlign != ContentAlignment.BottomRight)
                            {
                                goto IL_224;
                            }
                            goto IL_1E2;
IL_167:
                            if (textAlign != ContentAlignment.BottomCenter)
                            {
                                goto IL_170;
                            }
                            goto IL_1A9;
IL_15E:
                            if (textAlign > ContentAlignment.BottomLeft)
                            {
                                goto IL_167;
                            }
                            goto IL_17E;
Block_12:
                            goto IL_15E;
IL_184:
                            if (textAlign != ContentAlignment.BottomLeft)
                            {
                                goto IL_224;
                            }
                            goto IL_192;
IL_17E:
                            if (textAlign != ContentAlignment.MiddleRight)
                            {
                                goto IL_184;
                            }
                            goto IL_1E2;
IL_192:
                            this.int_0 = base.Margin.Left;
                            goto IL_224;
IL_1A9:
                            this.int_0 = (int)Math.Round((double)(unchecked ((float)base.Width - e.Graphics.MeasureString(text, this.Font).Width) / 2f));
                            goto IL_224;
IL_1E2:
                            this.int_0 = (int)Math.Round((double)(unchecked ((float)base.Width - e.Graphics.MeasureString(text, this.Font).Width - (float)base.Margin.Right)));
                            goto IL_224;
                        }
                    }
                    return;
                }
                finally
                {
                    List <string> .Enumerator enumerator;
                    ((IDisposable)enumerator).Dispose();
                }
            }
            string text2 = "";
            try
            {
                foreach (string str in this.list_0)
                {
                    text2 = text2 + str + " ";
                }
            }
            finally
            {
                List <string> .Enumerator enumerator2;
                ((IDisposable)enumerator2).Dispose();
            }
            this.sizeF_0 = e.Graphics.MeasureString(text2, this.Font);
            e.Graphics.DrawString(text2, this.Font, solidBrush, (float)this.int_0, (float)this.int_1);
        }
    }