Exemplo n.º 1
0
 private void method_13()
 {
     if (this.font_0 != null)
     {
         this.font_0 = null;
     }
     if (this.stringFormat_0 != null)
     {
         this.stringFormat_0.Dispose();
         this.stringFormat_0 = null;
     }
     if (this.class543_0 != null)
     {
         this.class543_0.method_12();
         this.class543_0 = null;
     }
     this.string_0 = null;
 }
Exemplo n.º 2
0
    private void method_8(string A_0, Graphics A_1, Font A_2, StringFormat A_3, SizeF A_4)
    {
        int num = 13;

        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("䜲倴伶䴸", num));
        }
        if (A_2 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("唲娴夶䴸", num));
        }
        this.string_0       = A_0;
        this.graphics_0     = A_1;
        this.font_0         = A_2;
        this.stringFormat_0 = A_3;
        this.sizeF_0        = A_4;
        this.class543_0     = new Class543(A_0);
    }
Exemplo n.º 3
0
    private void method_9(string A_0, Graphics A_1, Font A_2, sprᝪ A_3, StringFormat A_4, SizeF A_5)
    {
        int num = 12;

        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("䘱儳丵䰷", num));
        }
        if ((A_2 == null) && (A_3 == null))
        {
            throw new ArgumentNullException(BookmarkStart.b("吱嬳堵䰷", num));
        }
        this.string_0       = A_0;
        this.graphics_0     = A_1;
        this.font_0         = A_2;
        this.sprᝪ_0         = A_3;
        this.stringFormat_0 = A_4;
        this.sizeF_0        = A_5;
        this.class543_0     = new Class543(A_0);
    }
Exemplo n.º 4
0
    private Struct11 method_19(Struct11 A_0, bool A_1)
    {
        string str   = A_0.string_0;
        float  num   = A_0.float_0;
        bool   flag  = (A_0.textLineType_0 & TextLineType.FirstParagraphLine) == TextLineType.None;
        bool   flag2 = (this.stringFormat_0 == null) || (this.stringFormat_0.FormatFlags != StringFormatFlags.DirectionRightToLeft);

        char[] trimChars = Class543.char_3;
        if (flag)
        {
            str = flag2 ? str.TrimStart(trimChars) : str.TrimEnd(trimChars);
        }
        if ((this.stringFormat_0 == null) || (this.stringFormat_0.FormatFlags != StringFormatFlags.MeasureTrailingSpaces))
        {
            if (((A_0.textLineType_0 & TextLineType.FirstParagraphLine) > TextLineType.None) && Class543.smethod_2(str))
            {
                str = new string(' ', 1);
            }
            else
            {
                str = flag2 ? str.TrimEnd(trimChars) : str.TrimStart(trimChars);
            }
        }
        if (str.Length != A_0.string_0.Length)
        {
            num = this.method_20(str);
            if ((A_0.textLineType_0 & TextLineType.FirstParagraphLine) > TextLineType.None)
            {
                num += this.method_21(A_1);
            }
        }
        A_0.string_0 = str;
        A_0.float_0  = num;
        return(A_0);
    }
Exemplo n.º 5
0
    private Class545 method_17(string A_0, float A_1)
    {
        int num = 13;

        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("弲尴夶尸", num));
        }
        A_0 = A_0.Replace(BookmarkStart.b("㨲", num), BookmarkStart.b("ጲᔴ᜶ᤸ", num));
        Class545 class3 = new Class545 {
            float_0 = this.method_14()
        };
        List <Struct11> list  = new List <Struct11>();
        float           width = this.sizeF_0.Width;
        float           num6  = this.method_20(A_0) + A_1;
        TextLineType    firstParagraphLine = TextLineType.FirstParagraphLine;
        bool            flag2    = true;
        bool            flag3    = false;
        PointF          location = this.method_0().method_128().method_13().Location;
        SizeF           size     = (this.sprᝪ_0 != null) ? ((SizeF)this.method_7(A_0.ToString(), this.sprᝪ_0)) : ((SizeF)this.method_6(A_0.ToString(), this.font_0));
        RectangleF      ef18     = new RectangleF(location, size);
        Class312        class5   = this.method_0().method_28().method_51(ef18, this.interface1_0);

        if (((width <= 0f) || (num6 <= width)) && ((width > 0f) && class5.method_0().IsEmpty))
        {
            this.method_18(class3, list, A_0, num6, TextLineType.NewLineBreak | firstParagraphLine);
        }
        else
        {
            StringBuilder builder  = new StringBuilder();
            StringBuilder builder2 = new StringBuilder();
            num6 = A_1;
            Class543 class4 = new Class543(A_0);
            string   str3   = class4.method_7();
            if ((str3.Length != class4.method_1()) && (str3 == BookmarkStart.b("ጲ", num)))
            {
                class4.method_3(class4.method_2() + 1);
                str3 = BookmarkStart.b("ጲ", num) + class4.method_7();
            }
            while (str3 != null)
            {
                int    num9;
                PointF tf;
                bool   flag = this.method_16(str3);
                int    num7 = 0;
                if (!flag)
                {
                    builder2.Append(str3);
                }
                else
                {
                    num9 = 0;
                    while (num9 < str3.Length)
                    {
                        builder2.Append(str3.Substring(num9, 1));
                        if (this.method_20(builder2.ToString()) > width)
                        {
                            goto Label_01FD;
                        }
                        num9++;
                    }
                }
                goto Label_0201;
Label_01FD:
                num7 = num9;
Label_0201:
                tf = this.method_0().method_128().method_13().Location;
                SizeF                 ef12        = (this.sprᝪ_0 != null) ? ((SizeF)this.method_7(builder2.ToString(), this.sprᝪ_0)) : ((SizeF)this.method_6(builder2.ToString(), this.font_0));
                RectangleF            ef2         = new RectangleF(tf, new SizeF(ef12.Width, ef12.Height));
                Class312              class2      = this.method_0().method_28().method_51(ef2, this.interface1_0);
                float                 num13       = ef2.Right + class2.method_0().Width;
                float                 num5        = this.method_20(builder2.ToString());
                LineBreaksPunctuation punctuation = Class203.smethod_0(builder2[builder2.Length - 1]);
                bool  flag4 = char.IsPunctuation(builder2[builder2.Length - 1]);
                float num11 = 0f;
                if (flag4)
                {
                    num11 = (this.sprᝪ_0 != null) ? ((float)this.method_7(BookmarkStart.b("ጲ", num), this.sprᝪ_0).Width) : ((float)this.method_6(BookmarkStart.b("ጲ", num), this.font_0).Width);
                }
                if ((((num5 - width) > 0.005) && ((punctuation != LineBreaksPunctuation.LineBreaksBefore) || ((num5 - width) > (num11 / 2f)))) || (((!class2.method_0().IsEmpty&& (class2.method_2().method_0() != TextWrappingStyle.Inline)) && ((class2.method_2().method_0() != TextWrappingStyle.InFrontOfText) && (class2.method_2().method_0() != TextWrappingStyle.Behind))) && (class2.method_2().method_0() != TextWrappingStyle.TopAndBottom)))
                {
                    if (((class2.method_2().method_0() != TextWrappingStyle.Inline) && (class2.method_2().method_0() != TextWrappingStyle.InFrontOfText)) && ((class2.method_2().method_0() != TextWrappingStyle.Behind) && (class2.method_2().method_0() != TextWrappingStyle.TopAndBottom)))
                    {
                        if (num13 < this.method_0().method_128().method_13().Right)
                        {
                            this.method_0().method_28().method_14(true);
                            float num14 = class2.method_0().Left + ((float)Math.Round((double)class2.method_0().Width, 6));
                            this.method_0().method_28().method_16(Math.Max(class2.method_0().Right, num14));
                        }
                        else if (((num13 > this.method_0().method_128().method_13().Right) && !this.bool_0) && ((ef2.Left < class2.method_0().Left) || (this.method_0().method_128().method_13().Left > class2.method_0().Left)))
                        {
                            builder.Append(BookmarkStart.b("ጲ", num));
                            break;
                        }
                    }
                    if (this.method_22() == StringTrimming.None)
                    {
                        break;
                    }
                    if ((builder2.Length == str3.Length) && !flag)
                    {
                        int length = A_0.Split(null).Length;
                        if ((this.method_22() == StringTrimming.Word) || (length == 1))
                        {
                            class3.string_0 = A_0.Substring(class4.method_2());
                            if (str3.StartsWith(BookmarkStart.b("ጲ", num)))
                            {
                                builder.Append(A_0.Substring(0, class4.method_2()));
                            }
                            break;
                        }
                        flag2           = false;
                        builder2.Length = 0;
                        str3            = class4.method_11().ToString();
                    }
                    else
                    {
                        if ((this.method_22() != StringTrimming.Character) || !flag2)
                        {
                            string str4 = builder.ToString();
                            if (flag && (num7 > 0))
                            {
                                builder2.Remove(builder2.Length - 1, 1);
                                str4    = builder2.ToString();
                                builder = builder2;
                                class4.method_3(builder2.Length);
                            }
                            else if ((flag && (str4.Length == 0)) && (num7 == 0))
                            {
                                class4.method_3(0);
                                class3.string_0 = class4.method_13();
                                flag3           = true;
                            }
                            break;
                        }
                        flag2           = false;
                        builder2.Length = 0;
                        builder2.Append(builder.ToString());
                        str3 = class4.method_11().ToString();
                    }
                }
                else
                {
                    if ((flag && ((num7 > 0) || (builder2.Length == 1))) && ((punctuation == LineBreaksPunctuation.LineBreaksBefore) && ((num5 - width) <= (num11 / 2f))))
                    {
                        builder.Append(builder2);
                        num6  = num5;
                        flag2 = false;
                        class4.method_3(builder2.Length - 1);
                    }
                    else
                    {
                        builder.Append(str3);
                        num6 = num5;
                    }
                    if (flag2)
                    {
                        class4.method_6();
                        str3 = class4.method_7();
                    }
                    else
                    {
                        class4.method_8();
                        str3 = class4.method_11().ToString();
                    }
                }
            }
            if ((builder.Length > 0) || this.method_0().method_28().method_13())
            {
                string str  = builder.ToString();
                int    num2 = str.Length;
                int    num3 = Class203.smethod_4(A_0, num2);
                if (num3 != 0)
                {
                    string str2  = A_0.Substring(0, num2 + num3);
                    float  num12 = this.method_0().method_1() ? this.method_0().method_309(str2, this.sprᝪ_0, null).Width : this.method_0().method_316(str2, this.font_0, null).Width;
                    if (num12 <= width)
                    {
                        str = str2;
                        class4.method_3(class4.method_2() + num3);
                    }
                }
                while (class4.method_11() == ' ')
                {
                    class4.method_3(class4.method_2() + 1);
                }
                this.method_18(class3, list, str, num6, TextLineType.LastParagraphLine | TextLineType.NewLineBreak);
                if (!flag3)
                {
                    class3.string_0 = class4.method_13();
                }
            }
            class4.method_12();
        }
        class3.struct11_0 = list.ToArray();
        list.Clear();
        return(class3);
    }