Пример #1
0
 private void method_40(string A_0)
 {
     if (!string.IsNullOrEmpty(A_0))
     {
         if (this.list_0 != null)
         {
             this.list_0.Clear();
             this.list_0 = null;
         }
         this.list_0  = new List <Class217>();
         this.bool_10 = Class57.smethod_6(A_0[0]) == Spire.Doc.CharacterCategory.FarEast;
         this.bool_11 = Class57.smethod_6(A_0[A_0.Length - 1]) == Spire.Doc.CharacterCategory.FarEast;
         Class217 item   = new Class217();
         bool     flag   = false;
         bool     flag2  = false;
         int      num    = 0;
         int      length = A_0.Length;
         while (num < length)
         {
             flag = Class57.smethod_10(A_0[num]);
             if ((num + 1) >= length)
             {
                 flag2 = false;
             }
             else
             {
                 flag2 = Class57.smethod_10(A_0[num + 1]);
             }
             if (!item.method_2().HasValue&& flag)
             {
                 item.method_3(new int?(num));
                 item.method_7(num == 0);
                 item.method_11(Class57.smethod_11(A_0[num]));
             }
             if (item.method_2().HasValue&& !flag2)
             {
                 item.method_1(new int?(num));
                 item.method_5((num + 1) == length);
                 item.method_9(Class57.smethod_11(A_0[num]));
             }
             if (item.method_2().HasValue&& item.method_0().HasValue)
             {
                 this.LetterOrDigitPosition.Add(item);
                 item = new Class217();
             }
             num++;
         }
     }
 }
Пример #2
0
        private void method_43(ParagraphItemCollection A_0, string A_1, int A_2)
        {
            int num = 15;

            if (this.dictionary_0 == null)
            {
                this.dictionary_0 = new Dictionary <string, TextRange>();
            }
            string    key   = A_1 + BookmarkStart.b("樴", num) + A_2;
            TextRange range = null;

            if (this.dictionary_0.ContainsKey(key))
            {
                range = this.dictionary_0[key];
            }
            else
            {
                range = new TextRange(base.Document);
                range.CharacterFormat.ApplyBase(this.CharacterFormat);
                range.method_0(base.Owner);
                range.characterCategory_0 = this.CharacterCategory;
                range.StartPos            = A_2;
                range.int_4       = A_1.Length;
                range.string_9    = A_1;
                range.string_8    = A_1;
                range.textRange_0 = this;
                if (!string.IsNullOrEmpty(A_1))
                {
                    range.bool_12 = Class57.smethod_11(A_1[0]);
                    range.bool_13 = Class57.smethod_11(A_1[A_1.Length - 1]);
                    range.bool_14 = Class57.smethod_12(A_1[0]);
                    range.bool_15 = Class57.smethod_12(A_1[A_1.Length - 1]);
                    range.bool_10 = Class57.smethod_6(A_1[0]) == Spire.Doc.CharacterCategory.FarEast;
                    range.bool_11 = Class57.smethod_6(A_1[A_1.Length - 1]) == Spire.Doc.CharacterCategory.FarEast;
                }
                this.dictionary_0.Add(key, range);
            }
            A_0.InnerList.Add(range);
        }