Exemple #1
0
 private void method_23(List <BookmarkLevel> A_0, sprᣍ A_1, int A_2, int A_3)
 {
     if ((A_0 != null) && (A_0.Count > 0))
     {
         if (!this.bool_0)
         {
             this.bool_0 = true;
             sprᢧ rᢧ = new sprᢧ(new PointF(0f, 0f), 0, this.method_1().WordBookmarksTitle);
             rᢧ.ᜀ(true);
             rᢧ.ᜀ(new sprⓚ(this.method_1().WordBookmarksColor.ToArgb()));
             rᢧ.ᜀ(this.method_25(this.method_1().WordBookmarksTextStyle));
             A_1.ᜀ(rᢧ, A_3);
         }
         for (int i = 0; i < A_0.Count; i++)
         {
             BookmarkLevel level = A_0[i];
             if ((A_2 >= level.TargetPageNumber) && (level.TargetPageNumber != 0))
             {
                 if ((A_3 + 1) == level.TargetPageNumber)
                 {
                     sprᢧ  rᢧ2    = new sprᢧ(level.TargetBounds.Location, level.Level, level.Name);
                     Color color2 = (!(level.Color == Color.SaddleBrown) || !(this.method_1().WordBookmarksColor != Color.SaddleBrown)) ? level.Color : this.method_1().WordBookmarksColor;
                     rᢧ2.ᜀ(new sprⓚ(color2.ToArgb()));
                     rᢧ2.ᜀ(((level.Style != BookmarkTextStyle.Bold) || (this.method_1().WordBookmarksTextStyle == BookmarkTextStyle.Bold)) ? this.method_25(level.Style) : this.method_25(this.method_1().WordBookmarksTextStyle));
                     A_1.ᜀ(rᢧ2, A_3);
                 }
                 if (level.ChildObjects.Count > 0)
                 {
                     this.method_23(level.ChildObjects, A_1, A_2, A_3);
                 }
             }
         }
     }
 }
 private void method_31(Class196 A_0, Class375 A_1, BookmarkLevel A_2)
 {
     for (int i = 0; i < A_0.method_145().Count; i++)
     {
         string text = string.Empty;
         if (base.Owner is Paragraph)
         {
             text = (base.Owner as Paragraph).Text;
         }
         if (A_2 != null)
         {
             A_2.Text = text;
         }
         foreach (KeyValuePair <string, Class310> pair in A_0.method_145()[i])
         {
             if (pair.Key == this.Name)
             {
                 pair.Value.method_3(A_1.method_69());
                 pair.Value.method_5(A_0.method_16());
                 A_0.method_400(base.OwnerParagraph, pair.Value);
                 pair.Value.method_11(text);
                 if (A_2 != null)
                 {
                     A_2.SourcePageNumber = pair.Value.method_6();
                     A_2.SourceBounds     = pair.Value.method_0();
                 }
             }
         }
     }
 }
        void Interface1.Draw(Class196 dc, Class375 ltWidget)
        {
            int num = 8;

            if (!this.Name.StartsWith(b("焭", 8)))
            {
                BookmarkLevel item = new BookmarkLevel {
                    Name             = this.Name,
                    IsPair           = false,
                    TargetBounds     = ltWidget.method_69(),
                    TargetPageNumber = dc.method_16()
                };
                if (dc.method_149() != null)
                {
                    if (!dc.method_149().IsDrawComplete&& !dc.method_149().ChildObjects.Contains(item))
                    {
                        dc.method_149().method_0(item);
                        dc.method_150(item);
                        BookmarkLevelEventArgs args2 = new BookmarkLevelEventArgs {
                            BookmarkLevel = item,
                            BookmarkStart = this
                        };
                        base.Document.method_21(args2);
                    }
                }
                else if (!dc.method_147().Contains(item))
                {
                    dc.method_147().Add(item);
                    dc.method_150(item);
                    BookmarkLevelEventArgs args = new BookmarkLevelEventArgs {
                        BookmarkLevel = item,
                        BookmarkStart = this
                    };
                    base.Document.method_21(args);
                }
                this.method_31(dc, ltWidget, item);
            }
            else if (this.Name.ToLower().StartsWith(b("焭䐯崱圳", num)))
            {
                this.method_31(dc, ltWidget, null);
            }
        }
Exemple #4
0
 private void method_22(List <BookmarkLevel> A_0, PdfBookmark A_1)
 {
     if (A_0.Count > 0)
     {
         if (A_1 == null)
         {
             A_1 = this.pdfNewDocument_0.get_Bookmarks().Add(this.method_1().WordBookmarksTitle);
             A_1.set_Color((PdfRGBColor)this.method_1().WordBookmarksColor);
             A_1.set_DisplayStyle(this.method_24(this.method_1().WordBookmarksTextStyle));
         }
         for (int i = 0; i < A_0.Count; i++)
         {
             BookmarkLevel level = A_0[i];
             if ((this.pdfNewDocument_0.get_Pages().get_Count() >= level.TargetPageNumber) && (level.TargetPageNumber != 0))
             {
                 PdfPageBase base2 = this.pdfNewDocument_0.get_Pages().get_Item(level.TargetPageNumber - 1);
                 RectangleF  ef    = new RectangleF();
                 PdfDocumentLinkAnnotation annotation = new PdfDocumentLinkAnnotation(ef);
                 PdfBookmark bookmark = null;
                 annotation.set_Border(new PdfAnnotationBorder(0f));
                 PdfDestination destination = new PdfDestination(base2, level.TargetBounds.Location);
                 bookmark = A_1.Add(level.Name);
                 bookmark.set_Color((!(level.Color == Color.SaddleBrown) || !(this.method_1().WordBookmarksColor != Color.SaddleBrown)) ? ((PdfRGBColor)level.Color) : ((PdfRGBColor)this.method_1().WordBookmarksColor));
                 bookmark.set_DisplayStyle(((level.Style != BookmarkTextStyle.Bold) || (this.method_1().WordBookmarksTextStyle == BookmarkTextStyle.Bold)) ? this.method_24(level.Style) : this.method_24(this.method_1().WordBookmarksTextStyle));
                 annotation.set_Destination(destination);
                 bookmark.set_Action(new PdfGoToAction(annotation.get_Destination()));
                 if (base2 is PdfNewPage)
                 {
                     (base2 as PdfNewPage).get_Annotations().Add(annotation);
                 }
                 else
                 {
                     (base2 as PdfPageWidget).get_AnnotationsWidget().Add(annotation);
                 }
                 if ((level.ChildObjects.Count > 0) && (bookmark != null))
                 {
                     this.method_22(level.ChildObjects, bookmark);
                 }
             }
         }
     }
 }