Exemplo n.º 1
0
        public Tab AddTab(float position, TabJustification justification, TabLeader leader)
        {
            Tab tab = new Tab(base.Document, this.method_8((double)position), justification, leader);

            this.method_6(tab);
            return(tab);
        }
Exemplo n.º 2
0
    internal static string smethod_21(TabLeader A_0, bool A_1)
    {
        int num = 4;

        switch (A_0)
        {
        case TabLeader.NoLeader:
            return(BookmarkStart.b("䐩䌫䀭唯", num));

        case TabLeader.Dotted:
            return(BookmarkStart.b("丩䌫娭", num));

        case TabLeader.Hyphenated:
            return(BookmarkStart.b("䈩唫席堯圱娳", num));

        case TabLeader.Single:
            return(BookmarkStart.b("弩䈫䨭唯䀱䜳唵圷䠹夻", num));

        case TabLeader.Heavy:
            return(BookmarkStart.b("䈩䤫伭䘯䬱", num));

        case TabLeader.MiddleDot:
            if (A_1)
            {
                return(BookmarkStart.b("䜩䔫䨭启帱儳爵圷丹", num));
            }
            return(BookmarkStart.b("䜩䔫䨭启帱儳ᬵ尷唹䠻", num));
        }
        return("");
    }
Exemplo n.º 3
0
 public void method_3(TabLeader A_0)
 {
     if (A_0 != this.tabLeader_0)
     {
         this.tabLeader_0 = A_0;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Adds a TabStop object to the collection and sets its leader.
        /// </summary>
        public TabStop AddTabStop(Unit position, TabLeader leader)
        {
            TabStop tab = AddTabStop(position);

            tab.Leader = leader;
            return(tab);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Adds a TabStop object to the collection and sets its alignment and leader.
        /// </summary>
        public TabStop AddTabStop(Unit position, TabAlignment alignment, TabLeader leader)
        {
            TabStop tab = AddTabStop(position);

            tab.Alignment = alignment;
            tab.Leader    = leader;
            return(tab);
        }
Exemplo n.º 6
0
 public MezStyle SetTabStop(Unit unit, TabLeader leader, bool clearAll = false)
 {
     if (clearAll)
     {
         Style.ParagraphFormat.TabStops.ClearAll();
     }
     Style.ParagraphFormat.TabStops.AddTabStop(unit, leader);
     return(this);
 }
Exemplo n.º 7
0
    public void method_24(float A_0, TabJustification A_1, TabLeader A_2)
    {
        Class215 class2 = new Class215(A_0, A_1, A_2);

        if (!this.method_26(class2))
        {
            this.list_1.Add(class2);
        }
    }
Exemplo n.º 8
0
 internal bool method_7(float A_0, TabJustification A_1, TabLeader A_2)
 {
     foreach (object obj2 in base.InnerList)
     {
         if (((obj2 is Tab) && ((obj2 as Tab).Position == this.method_8((double)A_0))) && (((obj2 as Tab).Justification == A_1) && ((obj2 as Tab).TabLeader == A_2)))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 9
0
        /// <summary>
        /// Change tab leader for table of contents in the Word document.
        /// </summary>
        /// <param name="toc"></param>
        private static void ChangeTabLeaderForTableOfContents(TableOfContent toc, TabLeader tabLeader)
        {
            //Inserts the bookmark start before the TOC instance.
            BookmarkStart bkmkStart = new BookmarkStart(toc.Document, "tableOfContent");

            toc.OwnerParagraph.Items.Insert(toc.OwnerParagraph.Items.IndexOf(toc), bkmkStart);

            Entity lastItem = FindLastTOCItem(toc);

            //Insert the bookmark end to next of TOC last item.
            BookmarkEnd bkmkEnd   = new BookmarkEnd(toc.Document, "tableOfContent");
            WParagraph  paragraph = lastItem.Owner as WParagraph;

            paragraph.Items.Insert(paragraph.Items.IndexOf(lastItem) + 1, bkmkEnd);

            //Creates the bookmark navigator instance to access the bookmark
            BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(toc.Document);

            //Moves the virtual cursor to the location before the end of the bookmark "tableOfContent"
            bookmarkNavigator.MoveToBookmark("tableOfContent");
            //Gets the bookmark content
            TextBodyPart part = bookmarkNavigator.GetBookmarkContent();

            //Iterates the items from the bookmark to change the spacing in the table of content
            for (int i = 0; i < part.BodyItems.Count; i++)
            {
                paragraph = part.BodyItems[i] as WParagraph;
                //Sets the tab leader
                if (paragraph.ParagraphFormat.Tabs.Count != 0)
                {
                    paragraph.ParagraphFormat.Tabs[0].TabLeader = tabLeader;
                }
            }

            //Remove the bookmark which we add to get the paragraphs in the table of contents
            Bookmark bookmark = toc.Document.Bookmarks.FindByName("tableOfContent");

            toc.Document.Bookmarks.Remove(bookmark);
        }
Exemplo n.º 10
0
 /// <summary>
 /// Adds a TabStop object to the collection and sets its alignment and leader.
 /// </summary>
 public TabStop AddTabStop(Unit position, TabAlignment alignment, TabLeader leader)
 {
     return this.TabStops.AddTabStop(position, alignment, leader);
 }
Exemplo n.º 11
0
 internal TabOffset(TabLeader leader, XUnit offset)
 {
   this.leader = leader;
   this.offset = offset;
 }
Exemplo n.º 12
0
 public void method_5(TabLeader A_0)
 {
     this.tabLeader_0 = A_0;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Adds a TabStop object to the collection and sets its leader.
 /// </summary>
 public TabStop AddTabStop(Unit position, TabLeader leader)
 {
     return(TabStops.AddTabStop(position, leader));
 }
Exemplo n.º 14
0
 /// <summary>
 /// Adds a TabStop object to the collection and sets its alignment and leader.
 /// </summary>
 public TabStop AddTabStop(Unit position, TabAlignment alignment, TabLeader leader)
 {
     return(TabStops.AddTabStop(position, alignment, leader));
 }
Exemplo n.º 15
0
 /// <summary>
 /// Adds a TabStop object to the collection and sets its leader.
 /// </summary>
 public TabStop AddTabStop(Unit position, TabLeader leader)
 {
     TabStop tab = AddTabStop(position);
     tab.Leader = leader;
     return tab;
 }
Exemplo n.º 16
0
 /// <summary>
 /// Adds a TabStop object to the collection and sets its alignment and leader.
 /// </summary>
 public TabStop AddTabStop(Unit position, TabAlignment alignment, TabLeader leader)
 {
     TabStop tab = AddTabStop(position);
     tab.Alignment = alignment;
     tab.Leader = leader;
     return tab;
 }
Exemplo n.º 17
0
 /// <summary>
 /// Adds a TabStop object to the collection and sets its leader.
 /// </summary>
 public TabStop AddTabStop(Unit position, TabLeader leader)
 {
     return this.TabStops.AddTabStop(position, leader);
 }
Exemplo n.º 18
0
 internal Class215(float A_0, TabJustification A_1, TabLeader A_2)
 {
     this.float_0            = A_0;
     this.tabJustification_0 = A_1;
     this.tabLeader_0        = A_2;
 }
Exemplo n.º 19
0
 internal TabOffset(TabLeader leader, XUnit offset)
 {
     Leader = leader;
     Offset = offset;
 }
Exemplo n.º 20
0
    internal static void smethod_5(Class394 A_0, ParagraphFormat A_1)
    {
        int           num  = 0x10;
        TabCollection tabs = A_1.Tabs;

        while (A_0.method_9(BookmarkStart.b("䈵夷堹伻", num)))
        {
            string str2;
            if (((str2 = A_0.method_1()) == null) || !(str2 == BookmarkStart.b("䈵夷堹", num)))
            {
                continue;
            }
            Tab tab = null;
            TabJustification clear    = TabJustification.Clear;
            TabLeader        noLeader = TabLeader.NoLeader;
            while (A_0.method_19())
            {
                string str = A_0.method_1();
                if (str == null)
                {
                    continue;
                }
                if (str == BookmarkStart.b("䀵夷嘹", num))
                {
                    goto Label_013E;
                }
                if (str == BookmarkStart.b("娵崷嬹堻嬽㈿", num))
                {
                    goto Label_012F;
                }
                if (!(str == BookmarkStart.b("䘵圷䤹", num)))
                {
                    continue;
                }
                float num2 = A_0.method_62();
                if (num2 == float.MaxValue)
                {
                    continue;
                }
                using (IEnumerator enumerator = tabs.GetEnumerator())
                {
                    Tab current;
                    while (enumerator.MoveNext())
                    {
                        current = (Tab)enumerator.Current;
                        if (current.Position == num2)
                        {
                            goto Label_00DB;
                        }
                    }
                    goto Label_00F5;
Label_00DB:
                    tab = current;
                }
Label_00F5:
                if (tab == null)
                {
                    tab = tabs.AddTab();
                }
                if (clear == TabJustification.Clear)
                {
                    tab.Justification  = TabJustification.Left;
                    tab.DeletePosition = num2 * 20f;
                    tab.Position       = 0f;
                }
                else
                {
                    tab.Position = num2;
                }
                continue;
Label_012F:
                noLeader = Class248.smethod_20(A_0.method_3());
                continue;
Label_013E:
                A_0.method_3();
                clear = Class248.smethod_22(A_0.method_3());
            }
            if (clear != TabJustification.Clear)
            {
                tab.Justification = clear;
            }
            tab.TabLeader = noLeader;
        }
    }