Beispiel #1
0
        SizeF Interface2.Measure(Class196 dc)
        {
            SizeF empty = SizeF.Empty;

            if (!dc.method_127().Contains(this) && (this.FootnoteType == Spire.Doc.FootnoteType.Endnote))
            {
                dc.method_127().Add(this);
            }
            if (!this.IsAutoNumbered)
            {
                return(empty);
            }
            string  str     = string.Empty;
            Section section = base.method_2();

            if (section == null)
            {
                return(empty);
            }
            FootEndnoteOptions endnoteOptions = null;

            if (this.FootnoteType == Spire.Doc.FootnoteType.Endnote)
            {
                endnoteOptions = section.EndnoteOptions;
                endnoteOptions.ApplyBase(base.m_doc.EndnoteOptions);
            }
            else
            {
                endnoteOptions = section.FootnoteOptions;
                endnoteOptions.ApplyBase(base.m_doc.FootnoteOptions);
            }
            if (!(((Interface1)this).imethod_0() as Class205).method_5())
            {
                if (this.FootnoteType == Spire.Doc.FootnoteType.Footnote)
                {
                    if (endnoteOptions.RestartRule != FootnoteRestartRule.RestartPage)
                    {
                        Class500 class1 = dc.method_28();
                        class1.method_7(class1.method_6() + 1);
                    }
                    else
                    {
                        dc.method_28().method_7(dc.method_28().method_4().Count + 1);
                    }
                    str = ListLevel.smethod_2(dc.method_28().method_6(), endnoteOptions.NumberFormat);
                }
                else
                {
                    if (endnoteOptions.RestartRule != FootnoteRestartRule.DoNotRestart)
                    {
                        Class500 class2 = dc.method_28();
                        class2.method_12(class2.method_11() + 1);
                    }
                    else
                    {
                        dc.method_28().method_12(dc.method_127().Count);
                    }
                    str = ListLevel.smethod_2(dc.method_28().method_11(), endnoteOptions.NumberFormat);
                }
                (base.interface23_0 as Class209).method_16(str);
            }
            else
            {
                str = (base.interface23_0 as Class209).method_15();
            }
            return(dc.method_322(str, this.MarkerCharacterFormat));
        }