Exemplo n.º 1
0
    internal static void smethod_1(RowFormat A_0, bool A_1, bool A_2, Interface52 A_3, OoxmlCompliance A_4)
    {
        int num = 13;

        if (A_0 != null)
        {
            Class398  class2 = A_3.imethod_1();
            Class1054 class3 = new Class1054(smethod_2(A_0), A_2, A_3);
            RowFormat format = smethod_3(A_0);
            if (((format != null) && (class3.object_0 != null)) && ((bool)class3.object_0))
            {
                format.IsAutoResized = true;
            }
            if (A_1)
            {
                smethod_4(class3, format, class2, A_2, A_3, A_4, true);
            }
            else
            {
                if (class3.bool_6)
                {
                    class2.method_40(BookmarkStart.b("䐲༴䔶䨸刺夼派", num), class3.string_26);
                    class2.method_40(BookmarkStart.b("䐲༴䔶䨸刺夼款㍀", num), class3.string_25);
                }
                smethod_6(class3, format, class2, A_2, A_3, A_4, true);
                smethod_5(class3, format, class2, A_2, A_3, A_4, true);
            }
        }
    }
Exemplo n.º 2
0
    private static RowFormat smethod_2(RowFormat A_0)
    {
        RowFormat format = A_0;

        format.AcceptFormatRevision();
        return(format);
    }
Exemplo n.º 3
0
    private static void smethod_3(Table A_0)
    {
        TableRow row = A_0.Rows[0];
        int      num = (int)row.RowFormat.method_31(0x13ee);

        foreach (TableRow row3 in A_0.Rows)
        {
            int num5 = (int)row3.RowFormat.method_31(0x13ee);
            if (num5 < num)
            {
                num = num5;
                row = row3;
            }
        }
        int num6 = (int)((((row.Cells[0] == null) || !row.Cells[0].CellFormat.HasKey(0xc12)) ? row.RowFormat.Paddings.Left : row.Cells[0].CellFormat.Paddings.Left) * 20f);
        int num2 = num6 + ((int)row.RowFormat.method_31(0x13ee));

        foreach (TableRow row2 in A_0.Rows)
        {
            RowFormat rowFormat = row2.RowFormat;
            int       num4      = ((int)rowFormat.method_31(0x13ee)) - num;
            if (num4 != 0)
            {
                rowFormat.GridBeforeWidth.method_50((float)num4);
            }
            int num3 = (int)Math.Round((double)(rowFormat.LeftIndent * 20f));
            if (((num2 != 0) && (num != 0)) && (!rowFormat.method_6(0x10f4) || (rowFormat.method_6(0x13ee) && (Class59.smethod_4((float)num3, (float)num2, 0.001f) != 0))))
            {
                rowFormat.LeftIndent = ((float)num2) / 20f;
            }
            rowFormat.Remove(0x13ee);
        }
    }
Exemplo n.º 4
0
    private static void smethod_10(TableRow A_0)
    {
        int num = 14;

        if (A_0.RowFormat.HasFormatRevision)
        {
            Class580  formatRevision = A_0.RowFormat.FormatRevision;
            RowFormat format2        = (RowFormat)formatRevision.method_4();
            Class732  class2         = (Class732)format2.method_31(0x13ec);
            if (class2 == null)
            {
                A_0.RowFormat.method_47();
            }
            else
            {
                int num3 = 0;
                for (int i = 0; i < A_0.Cells.Count; i++)
                {
                    TableCell cell   = A_0.Cells[i];
                    Class580  class4 = new Class580(class2.method_0(num3), formatRevision.method_0(), formatRevision.method_2());
                    cell.CellFormat.FormatRevision = class4;
                    num3++;
                }
                if (num3 != class2.Count)
                {
                    throw new InvalidOperationException(BookmarkStart.b("稳䌵唷堹夻䰽怿ⵁ≃晅㡇㡉⍋㹍㕏⁑⁓㽕㵗⥙牛", num));
                }
            }
        }
    }
Exemplo n.º 5
0
 private void method_9(RowFormat A_0, TableRow A_1)
 {
     foreach (TableCell cell in A_1.Cells)
     {
         if (!cell.CellFormat.SamePaddingsAsTable && !A_0.Paddings.IsDefault)
         {
             if (!cell.CellFormat.Paddings.HasKey(1) && A_0.Paddings.HasKey(1))
             {
                 cell.CellFormat.Paddings.Left = A_0.Paddings.Left;
             }
             if (!cell.CellFormat.Paddings.HasKey(4) && A_0.Paddings.HasKey(4))
             {
                 cell.CellFormat.Paddings.Right = A_0.Paddings.Right;
             }
             if (!cell.CellFormat.Paddings.HasKey(2) && A_0.Paddings.HasKey(2))
             {
                 cell.CellFormat.Paddings.Top = A_0.Paddings.Top;
             }
             if (!cell.CellFormat.Paddings.HasKey(3) && A_0.Paddings.HasKey(3))
             {
                 cell.CellFormat.Paddings.Bottom = A_0.Paddings.Bottom;
             }
         }
     }
 }
Exemplo n.º 6
0
 private static RowFormat smethod_3(RowFormat A_0)
 {
     if (A_0.HasFormatRevision)
     {
         WordAttrCollection attrs  = A_0.method_50();
         WordAttrCollection attrs2 = smethod_2(A_0);
         for (int i = 0; i < attrs2.Count; i++)
         {
             int propKey = attrs2.method_18(i);
             if (attrs[propKey] == attrs2[propKey])
             {
                 attrs.Remove(propKey);
             }
         }
         attrs.Remove(0x271a);
         if (attrs.Count > 0)
         {
             attrs.FormatRevision = A_0.FormatRevision;
             return((RowFormat)attrs);
         }
     }
     else if (A_0.HasDeleteRevision || A_0.HasInsertRevision)
     {
         return(A_0);
     }
     return(null);
 }
Exemplo n.º 7
0
        public Estilo(String id, Font fonte, Style para, ParagraphFormat paragrafo, RowFormat linha, CellFormat celula, String texto)
        {
            Id        = id;
            Paragrafo = paragrafo;
            Linha     = linha;
            Celula    = celula;

            if (!string.IsNullOrEmpty(texto))
            {
                Texto = texto.Replace("\r", "").Replace("\n", "");
            }

            ParagrafoEstilo = para;
            ParagrafoEstilo.Font.AllCaps        = fonte.AllCaps;
            ParagrafoEstilo.Font.Bold           = fonte.Bold;
            ParagrafoEstilo.Font.Bidi           = fonte.Bidi;
            ParagrafoEstilo.Font.BoldBi         = fonte.BoldBi;
            ParagrafoEstilo.Font.Color          = fonte.Color;
            ParagrafoEstilo.Font.HighlightColor = fonte.HighlightColor;
            ParagrafoEstilo.Font.Italic         = fonte.Italic;
            ParagrafoEstilo.Font.ItalicBi       = fonte.ItalicBi;
            ParagrafoEstilo.Font.Name           = fonte.Name;
            ParagrafoEstilo.Font.Spacing        = fonte.Spacing;
            ParagrafoEstilo.Font.Size           = fonte.Size;
            ParagrafoEstilo.Font.StyleName      = fonte.StyleName;
            ParagrafoEstilo.Font.TextEffect     = fonte.TextEffect;
            ParagrafoEstilo.Font.Underline      = fonte.Underline;
            ParagrafoEstilo.Font.UnderlineColor = fonte.UnderlineColor;
        }
Exemplo n.º 8
0
    private static void smethod_3(Class581 A_0, RowFormat A_1)
    {
        int      num    = 7;
        Class394 class2 = A_0.imethod_1();
        string   str    = class2.method_1();

        if (str != null)
        {
            if (str == BookmarkStart.b("夬䴮崰", num))
            {
                smethod_2(A_0, A_1);
                smethod_0(A_0);
                A_0.method_3(new Table(A_0.Interface50.imethod_0()));
                return;
            }
            if (str == BookmarkStart.b("崬", num))
            {
                smethod_2(A_0, A_1);
                Class629.smethod_2(A_0);
                A_0.method_3(new Table(A_0.Interface50.imethod_0()));
                return;
            }
            if (str == BookmarkStart.b("帬䨮到䜲攴䔶", num))
            {
                class2.method_26();
                return;
            }
        }
        string str2 = class2.method_1();

        while (class2.method_9(str2))
        {
            smethod_1(A_0, A_1);
        }
    }
Exemplo n.º 9
0
    internal static void smethod_0(Class398 A_0, Table A_1)
    {
        int          num         = 1;
        RowFormat    tableFormat = A_1.TableFormat;
        List <float> tableGrid   = A_1.TableGrid;
        ArrayList    list2       = tableFormat.HasFormatRevision ? smethod_11(tableFormat) : null;

        A_0.method_4(BookmarkStart.b("倦ጨ弪伬䌮瘰䄲尴匶", num));
        for (int i = 1; i < tableGrid.Count; i++)
        {
            int num4 = Class59.smethod_8(tableGrid[i] - tableGrid[i - 1], 0);
            A_0.method_33(BookmarkStart.b("倦ጨ䰪弬䘮唰瀲娴嬶", num), new object[] { BookmarkStart.b("倦ጨ尪", num), num4 });
        }
        if (list2 != null)
        {
            A_0.method_4(BookmarkStart.b("倦ጨ弪伬䌮瘰䄲尴匶稸区尼儾♀♂", num));
            A_0.method_4(BookmarkStart.b("倦ጨ弪伬䌮瘰䄲尴匶", num));
            foreach (int num2 in list2)
            {
                A_0.method_33(BookmarkStart.b("倦ጨ䰪弬䘮唰瀲娴嬶", num), new object[] { BookmarkStart.b("倦ጨ尪", num), num2 });
            }
            A_0.method_5();
            A_0.method_5();
        }
        A_0.method_5();
    }
Exemplo n.º 10
0
 private static void smethod_4(RowFormat A_0, Class252 A_1)
 {
     A_0.SetAttr(0x13f0, A_1.method_9());
     A_0.SetAttr(0x13f1, A_1.method_11());
     A_0.GridBeforeWidth.method_50((float)A_1.method_10());
     A_0.GridAfterWidth.method_50((float)A_1.method_12());
 }
Exemplo n.º 11
0
    private static void smethod_2(Class581 A_0, RowFormat A_1)
    {
        Table table = (Table)A_0.method_13();

        table.PreferredTableWidth = A_1.TablePreferredWidthInfo;
        A_0.method_5(DocumentObjectType.Table);
    }
Exemplo n.º 12
0
    public static void smethod_12(Class581 A_0, RowFormat A_1, bool A_2)
    {
        string   str;
        int      num    = 15;
        Class394 class2 = A_0.imethod_1();
        Class584 class3 = new Class584(class2);

        if (class3.method_10() && ((str = class3.method_9()) != null))
        {
            if (str == BookmarkStart.b("戴堶䬸强ጼ社⹀ㅂ⡄♆㵈㽊⑌ⅎ㙐", num))
            {
                while (class2.method_9(BookmarkStart.b("吴夶圸吺䤼帾㕀⩂⩄⥆", num)))
                {
                    string str2;
                    if (((str2 = class2.method_1()) != null) && (str2 == BookmarkStart.b("嘴堶圸伺堼儾㕀", num)))
                    {
                        smethod_13(A_0, A_1, class3, A_2);
                    }
                    else
                    {
                        class2.vmethod_1();
                    }
                }
            }
            else if ((str != BookmarkStart.b("戴堶䬸强ጼ瘾⽀あ⁄㕆㵈≊≌ⅎ", num)) && (str != BookmarkStart.b("戴堶䬸强ጼ笾⑀⽂⁄㍆⁈⑊⍌", num)))
            {
            }
        }
    }
Exemplo n.º 13
0
        public void ApplyRowFormatting()
        {
            //ExStart:ApplyRowFormatting
            Document        doc     = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            Table table = builder.StartTable();

            builder.InsertCell();

            RowFormat rowFormat = builder.RowFormat;

            rowFormat.Height     = 100;
            rowFormat.HeightRule = HeightRule.Exactly;

            // These formatting properties are set on the table and are applied to all rows in the table.
            table.LeftPadding   = 30;
            table.RightPadding  = 30;
            table.TopPadding    = 30;
            table.BottomPadding = 30;

            builder.Writeln("I'm a wonderful formatted row.");

            builder.EndRow();
            builder.EndTable();

            doc.Save(ArtifactsDir + "WorkingWithTableStylesAndFormatting.ApplyRowFormatting.docx");
            //ExEnd:ApplyRowFormatting
        }
Exemplo n.º 14
0
    private void method_3(TableCell A_0, CellFormat A_1)
    {
        RowFormat rowFormat = A_0.OwnerRow.RowFormat;
        float     num       = A_1.HasKey(0xbfe) ? A_1.Paddings.Top : rowFormat.Paddings.Top;
        float     num4      = A_1.HasKey(0xc08) ? A_1.Paddings.Bottom : rowFormat.Paddings.Bottom;
        float     num2      = A_1.HasKey(0xc12) ? A_1.Paddings.Left : rowFormat.Paddings.Left;
        float     num3      = A_1.HasKey(0xc1c) ? A_1.Paddings.Right : rowFormat.Paddings.Right;

        if (A_1.CellWidth <= (num2 + num3))
        {
            num3 = 0f;
            num2 = 0f;
        }
        if (num != 0f)
        {
            this.class86_0.class1048_0.class411_0.string_2 = Class576.smethod_42((double)num);
        }
        if (num4 != 0f)
        {
            this.class86_0.class1048_0.class411_1.string_2 = Class576.smethod_42((double)num4);
        }
        if (num2 != 0f)
        {
            this.class86_0.class1048_0.class411_2.string_2 = Class576.smethod_42((double)num2);
        }
        if (num3 != 0f)
        {
            this.class86_0.class1048_0.class411_3.string_2 = Class576.smethod_42((double)num3);
        }
    }
Exemplo n.º 15
0
 private void method_20()
 {
     if (this.bool_1)
     {
         RowFormat rowFormat = this.table_0.FirstRow.RowFormat;
         this.bool_3 = rowFormat.HasKey(0xfdc);
         this.bool_4 = rowFormat.HasKey(0xff0);
         this.bool_5 = rowFormat.HasKey(0xfd2);
         this.bool_6 = rowFormat.HasKey(0xfe6);
         this.bool_7 = rowFormat.HasKey(0xffa);
         this.bool_8 = rowFormat.HasKey(0x1004);
         Border border = new Border {
             BorderType = BorderStyle.None,
             LineWidth  = 0f,
             Color      = Color.Empty
         };
         bool flag = (((this.bool_3 || this.bool_4) || (this.bool_5 || this.bool_6)) || this.bool_7) || this.bool_8;
         this.border_0 = flag ? border : null;
     }
     for (int i = 0; i < this.class982_0.Count; i++)
     {
         Class477 class2 = this.class982_0.method_0(i);
         for (int j = 0; this.method_21(class2.method_1()[j], i, j); j++)
         {
         }
         for (int k = this.method_9() - 1; this.method_21(class2.method_1()[k], i, k); k--)
         {
         }
     }
 }
Exemplo n.º 16
0
    internal void method_46(RowFormat A_0)
    {
        Class15 class2 = this.method_43();
        Class15 tablePreferredWidthInfo = A_0.TablePreferredWidthInfo;

        switch (class2.method_51())
        {
        case FtsWidth.None:
            tablePreferredWidthInfo.method_52(FtsWidth.None);
            tablePreferredWidthInfo.method_50(0f);
            return;

        case FtsWidth.Auto:
            tablePreferredWidthInfo.method_52(FtsWidth.Auto);
            tablePreferredWidthInfo.method_50(0f);
            return;

        case FtsWidth.Percentage:
            tablePreferredWidthInfo.method_52(FtsWidth.Percentage);
            tablePreferredWidthInfo.method_50(class2.method_49());
            return;

        case FtsWidth.Point:
            tablePreferredWidthInfo.method_52(FtsWidth.Point);
            tablePreferredWidthInfo.method_50(class2.method_49());
            return;
        }
    }
Exemplo n.º 17
0
    private static void smethod_2(RowFormat A_0, Class394 A_1)
    {
        int  num   = 10;
        bool flag  = false;
        bool flag2 = false;

        while (A_1.method_19())
        {
            string str = A_1.method_1();
            if (str != null)
            {
                if (!(str == BookmarkStart.b("堯ἱ䘳䌵吷弹", num)))
                {
                    if (str == BookmarkStart.b("䘯匱堳", num))
                    {
                        A_0.OwnerRow.Height = A_1.method_62();
                        flag2 = true;
                    }
                }
                else
                {
                    A_0.OwnerRow.HeightType = Class859.smethod_2(A_1.method_3());
                    flag = true;
                }
            }
        }
        if (flag2 && !flag)
        {
            A_0.HeightType = TableRowHeightType.AtLeast;
        }
    }
Exemplo n.º 18
0
        public static void SetTableRowFormatting(string dataDir)
        {
            //ExStart:DocumentBuilderSetTableRowFormatting
            Document        doc     = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            Table table = builder.StartTable();

            builder.InsertCell();

            // Set the row formatting
            RowFormat rowFormat = builder.RowFormat;

            rowFormat.Height     = 100;
            rowFormat.HeightRule = HeightRule.Exactly;
            // These formatting properties are set on the table and are applied to all rows in the table.
            table.LeftPadding   = 30;
            table.RightPadding  = 30;
            table.TopPadding    = 30;
            table.BottomPadding = 30;

            builder.Writeln("I'm a wonderful formatted row.");

            builder.EndRow();
            builder.EndTable();

            dataDir = dataDir + "DocumentBuilderSetTableRowFormatting_out_.doc";
            doc.Save(dataDir);
            //ExEnd:DocumentBuilderSetTableRowFormatting
            Console.WriteLine("\nTable row formatting using DocumentBuilder set successfully.\nFile saved at " + dataDir);
        }
Exemplo n.º 19
0
    internal static void smethod_2(RowFormat A_0)
    {
        object right = A_0.method_31(0x13ed);

        if (right == null)
        {
            return;
        }
        if (A_0.method_31(0xfaa) != null)
        {
            goto Label_0069;
        }
        if (A_0.Bidi)
        {
            switch (((RowAlignment)right))
            {
            case RowAlignment.Left:
                right = RowAlignment.Right;
                goto Label_005D;

            case RowAlignment.Right:
                right = RowAlignment.Left;
                goto Label_005D;
            }
            right = (RowAlignment)right;
        }
Label_005D:
        A_0.SetAttr(0xfaa, right);
Label_0069:
        A_0.Remove(0x13ed);
    }
Exemplo n.º 20
0
    private static void smethod_5(TableRow A_0, bool A_1, bool A_2, bool A_3, int A_4)
    {
        RowFormat format = smethod_6(A_0.RowFormat, A_1);
        ArrayList list   = (ArrayList)smethod_6(A_0.ParentTable.TableFormat, A_1).method_31(0x13ef);
        int       num    = (int)format.method_32(0x13f0);

        if (list.Count > 0)
        {
            int num2 = num;
            foreach (TableCell cell in A_0.Cells)
            {
                int        num4       = 0;
                CellFormat cellFormat = cell.CellFormat;
                short      num5       = (short)smethod_7(cellFormat, A_1).method_32(0xf3c);
                int        num3       = Math.Min(num2 + num5, list.Count);
                while (num2 < num3)
                {
                    num4 += Convert.ToInt32(list[num2++]);
                }
                if (num4 != 0)
                {
                    if (A_1)
                    {
                        if (A_2)
                        {
                            if (A_3)
                            {
                                cellFormat.RevisedPr.CellWidth = (((float)num4) / ((float)A_4)) * 100f;
                                cellFormat.RevisedPr.WidthUnit = FtsWidth.Percentage;
                            }
                            else
                            {
                                cellFormat.RevisedPr.CellWidth = ((float)num4) / 20f;
                                cellFormat.RevisedPr.WidthUnit = FtsWidth.Point;
                            }
                        }
                        cellFormat.RevisedPr.TwipCellWidth = num4;
                    }
                    else if (cellFormat.HasFormatRevision)
                    {
                        if (A_2)
                        {
                            if (A_3)
                            {
                                cell.SetCellWidth((((float)num4) / ((float)A_4)) * 100f, CellWidthType.Percentage);
                            }
                            else
                            {
                                cell.SetCellWidth(((float)num4) / 20f, CellWidthType.Point);
                            }
                        }
                        cellFormat.TwipCellWidth = num4;
                    }
                }
            }
        }
    }
Exemplo n.º 21
0
        private void InsertFirstPageHeaderFooter(WordDocument doc, IWSection section)
        {
            Assembly execAssm = typeof(HeadersAndFootersDemo).GetTypeInfo().Assembly;

            Stream inputStream = execAssm.GetManifestResourceStream("Syncfusion.SampleBrowser.UWP.DocIO.DocIO.Assets.Northwind_logo.png");

            // Add a new paragraph for header to the document.
            IWParagraph headerPar = new WParagraph(doc);

            // Add a new table to the header.
            IWTable table = section.HeadersFooters.FirstPageHeader.AddTable();

            RowFormat format = new RowFormat();

            // Setting cleared table border style.
            format.Borders.BorderType = Syncfusion.DocIO.DLS.BorderStyle.Cleared;

            // Inserting table with a row and two columns.
            table.ResetCells(1, 2, format, 265);

            // Inserting logo image to the table first cell.
            headerPar = table[0, 0].AddParagraph() as WParagraph;
            headerPar.AppendPicture(inputStream);
            //Set Image size
            (headerPar.Items[0] as WPicture).Width  = 232.5f;
            (headerPar.Items[0] as WPicture).Height = 54.75f;
            // Inserting text to the table second cell.
            headerPar = table[0, 1].AddParagraph() as WParagraph;
            IWTextRange txt = headerPar.AppendText("Company Headquarters,\n2501 Aerial Center Parkway,\nSuite 110, Morrisville, NC 27560,\nTEL 1-888-936-8638.");

            txt.CharacterFormat.FontSize                  = 12;
            txt.CharacterFormat.CharacterSpacing          = 1.7f;
            headerPar.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Right;
            // Add a new paragraph to the header with address text.
            headerPar = new WParagraph(doc);
            headerPar.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Center;
            txt = headerPar.AppendText("\nFirst Page Header");
            txt.CharacterFormat.CharacterSpacing = 1.7f;
            section.HeadersFooters.FirstPageHeader.Paragraphs.Add(headerPar);

            // Add a footer paragraph text to the document.
            WParagraph footerPar = new WParagraph(doc);

            footerPar.ParagraphFormat.Tabs.AddTab(523f, TabJustification.Right, TabLeader.NoLeader);
            // Add text.
            footerPar.AppendText("Copyright Northwind Inc. 2001 - 2015");
            // Add page and Number of pages field to the document.
            footerPar.AppendText("\tFirst Page ");
            footerPar.AppendField("Page", FieldType.FieldPage);
            section.HeadersFooters.FirstPageFooter.Paragraphs.Add(footerPar);
            #region Page Number Settings
            section.PageSetup.RestartPageNumbering = true;
            section.PageSetup.PageStartingNumber   = Convert.ToInt32(this.numericUpDown1.Value);
            section.PageSetup.PageNumberStyle      = (PageNumberStyle)Enum.Parse(typeof(PageNumberStyle), this.comboBox1.SelectedItem.ToString(), true);
            #endregion
        }
Exemplo n.º 22
0
    private static void smethod_2(CellCollection A_0, RowFormat A_1, bool A_2)
    {
        Class732 class2 = new Class732();

        A_1.SetAttr(0x13ec, class2);
        foreach (TableCell cell in A_0)
        {
            class2.Add(A_2 ? cell.CellFormat.SysDirectAttrs : cell.CellFormat);
        }
    }
Exemplo n.º 23
0
    internal static void smethod_2(RowFormat A_0, Class581 A_1)
    {
        int      num    = 9;
        Class394 class2 = A_1.imethod_1();

        while (class2.method_9(BookmarkStart.b("嬮匰弲攴䔶簸䌺", num)))
        {
            smethod_3(A_0, A_1);
        }
    }
Exemplo n.º 24
0
    internal Class428 method_67(RowFormat A_0, bool A_1, Class1056 A_2)
    {
        this.bool_3      = A_1;
        this.class1056_0 = A_2;
        this.class758_0.method_32(base.class345_0);
        this.rowFormat_1 = A_0;
        RowFormat format = (!A_1 || A_2.method_2()) ? A_0 : ((RowFormat)A_0.SysDirectAttrs);

        return(new Class428(base.method_1(format)));
    }
Exemplo n.º 25
0
 private static RowFormat smethod_6(RowFormat A_0, bool A_1)
 {
     if (A_1)
     {
         RowFormat format = A_0.method_50();
         format.AcceptFormatRevision();
         return(format);
     }
     return(A_0);
 }
Exemplo n.º 26
0
    private RowFormat method_0(TableRow A_0)
    {
        RowFormat rowFormat = A_0.RowFormat;

        if (this.bool_0 && rowFormat.HasFormatRevision)
        {
            rowFormat = (RowFormat)rowFormat.FormatRevision.method_4();
        }
        return(rowFormat);
    }
Exemplo n.º 27
0
        private void InsertFirstPageHeaderFooter(WordDocument doc, IWSection section)
        {
            // Add a new paragraph for header to the document.
            IWParagraph headerPar = new WParagraph(doc);

            // Add a new table to the header.
            IWTable table = section.HeadersFooters.FirstPageHeader.AddTable();

            RowFormat format = new RowFormat();

            // Setting cleared table border style.
            format.Borders.BorderType = Syncfusion.DocIO.DLS.BorderStyle.Cleared;

            // Inserting table with a row and two columns.
            table.ResetCells(1, 2, format, 265);

            // Inserting logo image to the table first cell.
            headerPar = table[0, 0].AddParagraph() as WParagraph;
            string     basePath    = _hostingEnvironment.WebRootPath;
            FileStream imageStream = new FileStream(basePath + @"/images/DocIO/Northwind_logo.png", FileMode.Open, FileAccess.Read);

            headerPar.AppendPicture(imageStream);
            //Set Image size
            (headerPar.Items[0] as WPicture).Width  = 232.5f;
            (headerPar.Items[0] as WPicture).Height = 54.75f;
            // Inserting text to the table second cell.
            headerPar = table[0, 1].AddParagraph() as WParagraph;
            IWTextRange txt = headerPar.AppendText("Company Headquarters,\n2501 Aerial Center Parkway,\nSuite 110, Morrisville, NC 27560,\nTEL 1-888-936-8638.");

            txt.CharacterFormat.FontSize                  = 12;
            txt.CharacterFormat.CharacterSpacing          = 1.7f;
            headerPar.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Right;
            // Add a new paragraph to the header with address text.
            headerPar = new WParagraph(doc);
            headerPar.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Center;
            txt = headerPar.AppendText("\nFirst Page Header");
            txt.CharacterFormat.CharacterSpacing = 1.7f;
            section.HeadersFooters.FirstPageHeader.Paragraphs.Add(headerPar);

            // Add a footer paragraph text to the document.
            WParagraph footerPar = new WParagraph(doc);

            footerPar.ParagraphFormat.Tabs.AddTab(523f, TabJustification.Right, TabLeader.NoLeader);
            // Add text.
            footerPar.AppendText("Copyright Northwind Inc. 2001 - 2017");
            // Add page and Number of pages field to the document.
            footerPar.AppendText("\tFirst Page ");
            footerPar.AppendField("Page", FieldType.FieldPage);
            section.HeadersFooters.FirstPageFooter.Paragraphs.Add(footerPar);
            #region Page Number Settings
            section.PageSetup.RestartPageNumbering = true;
            section.PageSetup.PageStartingNumber   = 1;
            section.PageSetup.PageNumberStyle      = PageNumberStyle.Arabic;
            #endregion Page Number Settings
        }
Exemplo n.º 28
0
    private static void smethod_1(Class581 A_0, RowFormat A_1)
    {
        int      num    = 8;
        Class394 class2 = A_0.imethod_1();

        if (A_0.vmethod_1())
        {
            Class9 class3 = Class402.smethod_0(A_0, MarkupLevel.Cell);
            A_0.method_3(class3);
            while (class2.method_9(class3.method_22()))
            {
                smethod_1(A_0, A_1);
            }
            A_0.method_5(DocumentObjectType.CustomXml);
        }
        else
        {
            string str = class2.method_1();
            if (str != null)
            {
                if (str == BookmarkStart.b("娭刯帱搳䐵紷䈹", num))
                {
                    Class829.smethod_2(A_1, A_0);
                    return;
                }
                if (str == BookmarkStart.b("娭䈯戱䘳", num))
                {
                    Class1131.smethod_0(A_1, A_0);
                    return;
                }
                if (str == BookmarkStart.b("娭匯", num))
                {
                    Class251.smethod_0(A_0);
                    return;
                }
                if (str == BookmarkStart.b("伭帯就嬳䈵夷丹唻儽⸿", num))
                {
                    TableRow  lastRow   = A_0.Interface50.imethod_0().LastSection.Tables[A_0.Interface50.imethod_0().LastSection.Tables.Count - 1].LastRow;
                    TableCell cell      = lastRow.Cells[lastRow.Cells.Count - 1];
                    Paragraph paragraph = cell.Items[cell.Items.Count - 1] as Paragraph;
                    if (paragraph == null)
                    {
                        paragraph = cell.AddParagraph();
                    }
                    Class519.smethod_1(A_0, paragraph);
                    return;
                }
            }
            string str2 = class2.method_1();
            while (class2.method_9(str2))
            {
                smethod_1(A_0, A_1);
            }
        }
    }
Exemplo n.º 29
0
    internal FormatBase method_84()
    {
        RowFormat format = new RowFormat(base.Document);

        format.method_24(this);
        if (base.BaseFormat != null)
        {
            format.ApplyBase((base.BaseFormat as Form2).method_84());
        }
        return(format);
    }
Exemplo n.º 30
0
        public OutputStreamFactory(RowFormat format, bool csvHeader, JsonSerializer serialiser)
        {
            if (serialiser == null)
            {
                throw new ArgumentNullException(nameof(serialiser));
            }

            this.format     = format;
            this.csvHeader  = csvHeader;
            this.serialiser = serialiser;
        }
Exemplo n.º 31
0
 public RowConf(string label, string propery, RowFormat decimals, bool prc)
 {
     Propery = propery;
     Decimals = decimals;
     Label = label;
     PrcChange = prc;
 }