当前位置: 首页>>代码示例>>C#>>正文


C# RunProperties.Append方法代码示例

本文整理汇总了C#中RunProperties.Append方法的典型用法代码示例。如果您正苦于以下问题:C# RunProperties.Append方法的具体用法?C# RunProperties.Append怎么用?C# RunProperties.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RunProperties的用法示例。


在下文中一共展示了RunProperties.Append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddAlphaRow

        public Paragraph AddAlphaRow()
        {
            var paragraph1 = new Paragraph {RsidParagraphMarkRevision = "005205ED", RsidParagraphAddition = "00A01149", RsidParagraphProperties = "005205ED", RsidRunAdditionDefault = "00E7001C"};

            var paragraphProperties1 = new ParagraphProperties();
            var spacingBetweenLines1 = new SpacingBetweenLines {After = "60", Line = "240", LineRule = LineSpacingRuleValues.Auto};
            var justification1 = new Justification {Val = JustificationValues.Center};

            var paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            var runFonts1 = new RunFonts {ComplexScriptTheme = ThemeFontValues.MinorHighAnsi};
            var bold1 = new Bold();
            var fontSize1 = new FontSize {Val = "32"};
            var fontSizeComplexScript1 = new FontSizeComplexScript {Val = "32"};

            paragraphMarkRunProperties1.Append(runFonts1);
            paragraphMarkRunProperties1.Append(bold1);
            paragraphMarkRunProperties1.Append(fontSize1);
            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);

            paragraphProperties1.Append(new KeepNext());
            paragraphProperties1.Append(spacingBetweenLines1);
            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            var run1 = new Run {RsidRunProperties = "005205ED"};

            var runProperties1 = new RunProperties();
            var runFonts2 = new RunFonts {ComplexScriptTheme = ThemeFontValues.MinorHighAnsi};
            var bold2 = new Bold();
            var fontSize2 = new FontSize {Val = "32"};
            var fontSizeComplexScript2 = new FontSizeComplexScript {Val = "32"};

            runProperties1.Append(runFonts2);
            runProperties1.Append(bold2);
            runProperties1.Append(fontSize2);
            runProperties1.Append(fontSizeComplexScript2);
            var text1 = new Text();
            text1.Text = FamilyName.Substring(0, 1);

            run1.Append(runProperties1);
            run1.Append(text1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            return paragraph1;
        }
开发者ID:stevesloka,项目名称:bvcms,代码行数:46,代码来源:CompactRow.cs

示例2: ApplyStyle

        public static StyleDefinitionsPart ApplyStyle(this StyleDefinitionsPart part, IStyle mystyle)
        {
            var pRp = new RunProperties();
            var color = new Color()
            {
                Val = mystyle.Color
            };
            var fonts = new RunFonts
            {
                Ascii = mystyle.FontName
            };
            pRp.Append(color);
            pRp.Append(fonts);

            if (mystyle.Bold)
            {
                pRp.Append(new Bold());
            }

            pRp.Append(new FontSize()
            {
                Val = mystyle.FontSize.ToString()
            });

            var style = new Style { StyleId = mystyle.Id };
            style.Append(new Name() { Val = mystyle.Name });
            style.Append(new BasedOn() { Val = mystyle.BasedOn });
            style.Append(new NextParagraphStyle() { Val = "Normal" });

            style.Append(pRp);

            if (part.Styles == null)
            {
                part.Styles = new Styles();
            }

            part.Styles.Append(style);
            part.Styles.Save();

            return part;
        }
开发者ID:IdeaFortune,项目名称:DocumentGenerator,代码行数:41,代码来源:StyleHelpers.cs

示例3: CreateCodeParagraph

        private Paragraph CreateCodeParagraph(CodeVM code)
        {
            Paragraph paragraph1 = new Paragraph();

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Indentation indentation1 = new Indentation(){ FirstLine = "210", FirstLineChars = 100 };

            paragraphProperties1.Append(indentation1);

            Run run1 = new Run();

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts1 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties1.Append(runFonts1);
            Text text1 = new Text();
            text1.Text = code.Value;
            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run();

            RunProperties runProperties2 = new RunProperties();
            RunFonts runFonts2 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties2.Append(runFonts2);
            TabChar tabChar1 = new TabChar();

            run2.Append(runProperties2);
            run2.Append(tabChar1);

            Run run3 = new Run();

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts3 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties3.Append(runFonts3);
            Text text2 = new Text();
            text2.Text = code.Label;

            run3.Append(runProperties3);
            run3.Append(text2);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            return paragraph1;
        }
开发者ID:Easy-DDI-Organizer,项目名称:EDO,代码行数:49,代码来源:CodebookWriter.cs

示例4: CreateRun

        private static RunProperties CreateRun(Model.Text text)
        {
            RunProperties runProperties = new RunProperties();
            if (text.Font == null) return null;

            FontSize size = new FontSize()
            {
                Val = Utilities.GetHPSValue(text.Font.Size)
            };

            runProperties.Append(size);

            foreach (var format in text.Font.Formats)
            {
                switch (format)
                {
                    case Model.FontFormats.Bold: runProperties.Append(new Bold()); break;
                    case Model.FontFormats.Italic: runProperties.Append(new Italic()); break;
                    case Model.FontFormats.Underlined: runProperties.Append(new Underline() { Val = UnderlineValues.Single}); break;
                }
            }

            return runProperties;
        }
开发者ID:amilasurendra,项目名称:pdf-generator,代码行数:24,代码来源:TextFormatter.cs

示例5: GenerateReportDataHeadParagraph

        private Paragraph GenerateReportDataHeadParagraph()
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00F24BD4", RsidParagraphAddition = "0073701D", RsidParagraphProperties = "00D25DD5", RsidRunAdditionDefault = "00D25DD5" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Heading1" };
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "120", After = "120" };
            Justification justification1 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" };
            FontSize fontSize1 = new FontSize() { Val = "36" };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "36" };

            paragraphMarkRunProperties1.Append(runFonts1);
            paragraphMarkRunProperties1.Append(fontSize1);
            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);

            paragraphProperties1.Append(paragraphStyleId1);
            paragraphProperties1.Append(spacingBetweenLines1);
            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run() { RsidRunProperties = "00F24BD4" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" };
            FontSize fontSize2 = new FontSize() { Val = "36" };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "36" };

            runProperties1.Append(runFonts2);
            runProperties1.Append(fontSize2);
            runProperties1.Append(fontSizeComplexScript2);
            Text text1 = new Text();
            text1.Text = "管";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run() { RsidRunAddition = "00F24BD4" };

            RunProperties runProperties2 = new RunProperties();
            RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" };
            FontSize fontSize3 = new FontSize() { Val = "36" };
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "36" };

            runProperties2.Append(runFonts3);
            runProperties2.Append(fontSize3);
            runProperties2.Append(fontSizeComplexScript3);
            Text text2 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text2.Text = " ";

            run2.Append(runProperties2);
            run2.Append(text2);

            Run run3 = new Run() { RsidRunProperties = "00F24BD4" };

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" };
            FontSize fontSize4 = new FontSize() { Val = "36" };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "36" };

            runProperties3.Append(runFonts4);
            runProperties3.Append(fontSize4);
            runProperties3.Append(fontSizeComplexScript4);
            Text text3 = new Text();
            text3.Text = "材";

            run3.Append(runProperties3);
            run3.Append(text3);

            Run run4 = new Run() { RsidRunAddition = "00F24BD4" };

            RunProperties runProperties4 = new RunProperties();
            RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" };
            FontSize fontSize5 = new FontSize() { Val = "36" };
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "36" };

            runProperties4.Append(runFonts5);
            runProperties4.Append(fontSize5);
            runProperties4.Append(fontSizeComplexScript5);
            Text text4 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text4.Text = " ";

            run4.Append(runProperties4);
            run4.Append(text4);

            Run run5 = new Run() { RsidRunProperties = "00F24BD4" };

            RunProperties runProperties5 = new RunProperties();
            RunFonts runFonts6 = new RunFonts() { Hint = FontTypeHintValues.EastAsia, Ascii = "微软雅黑", HighAnsi = "微软雅黑", EastAsia = "微软雅黑" };
            FontSize fontSize6 = new FontSize() { Val = "36" };
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "36" };

            runProperties5.Append(runFonts6);
            runProperties5.Append(fontSize6);
            runProperties5.Append(fontSizeComplexScript6);
            Text text5 = new Text();
            text5.Text = "单";

//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:101,代码来源:OutgoingNoticeController.cs

示例6: GeneratePageCountparagraph

        private Paragraph GeneratePageCountparagraph(int pageCount)
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "004E307B", RsidParagraphProperties = "00E073E3", RsidRunAdditionDefault = "00E073E3" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Justification justification1 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

            paragraphMarkRunProperties1.Append(runFonts1);

            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run();

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

            runProperties1.Append(runFonts2);
            Text text1 = new Text();
            text1.Text = "第";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run();

            RunProperties runProperties2 = new RunProperties();
            RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

            runProperties2.Append(runFonts3);
            Text text2 = new Text();
            text2.Text = pageCount.ToString();

            run2.Append(runProperties2);
            run2.Append(text2);

            Run run3 = new Run();

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

            runProperties3.Append(runFonts4);
            Text text3 = new Text();
            text3.Text = "页";

            run3.Append(runProperties3);
            run3.Append(text3);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            return paragraph1;
        }
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:57,代码来源:OutgoingNoticeController.cs

示例7: GenerateGlossaryDocumentPart1Content

        // Generates content of glossaryDocumentPart1.
        private void GenerateGlossaryDocumentPart1Content(GlossaryDocumentPart glossaryDocumentPart1)
        {
            GlossaryDocument glossaryDocument1 = new GlossaryDocument(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" }  };
            glossaryDocument1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            glossaryDocument1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            glossaryDocument1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            glossaryDocument1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            glossaryDocument1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            glossaryDocument1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            glossaryDocument1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            glossaryDocument1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            glossaryDocument1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            glossaryDocument1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            glossaryDocument1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            glossaryDocument1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml");
            glossaryDocument1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            glossaryDocument1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            glossaryDocument1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            glossaryDocument1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            DocParts docParts1 = new DocParts();

            DocPart docPart1 = new DocPart();

            DocPartProperties docPartProperties1 = new DocPartProperties();
            DocPartName docPartName1 = new DocPartName(){ Val = "DefaultPlaceholder_1081868558" };

            Category category1 = new Category();
            Name name1 = new Name(){ Val = "General" };
            Gallery gallery1 = new Gallery(){ Val = DocPartGalleryValues.Placeholder };

            category1.Append(name1);
            category1.Append(gallery1);

            DocPartTypes docPartTypes1 = new DocPartTypes();
            DocPartType docPartType1 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder };

            docPartTypes1.Append(docPartType1);

            Behaviors behaviors1 = new Behaviors();
            Behavior behavior1 = new Behavior(){ Val = DocPartBehaviorValues.Content };

            behaviors1.Append(behavior1);
            DocPartId docPartId1 = new DocPartId(){ Val = "{F039DA22-FC7F-4FBD-92C2-651CCBF1B274}" };

            docPartProperties1.Append(docPartName1);
            docPartProperties1.Append(category1);
            docPartProperties1.Append(docPartTypes1);
            docPartProperties1.Append(behaviors1);
            docPartProperties1.Append(docPartId1);

            DocPartBody docPartBody1 = new DocPartBody();

            Paragraph paragraph19 = new Paragraph(){ RsidParagraphAddition = "00930812", RsidRunAdditionDefault = "00B75576" };

            Run run25 = new Run(){ RsidRunProperties = "003E0DED" };

            RunProperties runProperties43 = new RunProperties();
            RunStyle runStyle3 = new RunStyle(){ Val = "PlaceholderText" };

            runProperties43.Append(runStyle3);
            Text text25 = new Text();
            text25.Text = "Click here to enter text.";

            run25.Append(runProperties43);
            run25.Append(text25);

            paragraph19.Append(run25);

            docPartBody1.Append(paragraph19);

            docPart1.Append(docPartProperties1);
            docPart1.Append(docPartBody1);

            DocPart docPart2 = new DocPart();

            DocPartProperties docPartProperties2 = new DocPartProperties();
            DocPartName docPartName2 = new DocPartName(){ Val = "DefaultPlaceholder_1081868562" };

            Category category2 = new Category();
            Name name2 = new Name(){ Val = "General" };
            Gallery gallery2 = new Gallery(){ Val = DocPartGalleryValues.Placeholder };

            category2.Append(name2);
            category2.Append(gallery2);

            DocPartTypes docPartTypes2 = new DocPartTypes();
            DocPartType docPartType2 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder };

            docPartTypes2.Append(docPartType2);

            Behaviors behaviors2 = new Behaviors();
            Behavior behavior2 = new Behavior(){ Val = DocPartBehaviorValues.Content };

            behaviors2.Append(behavior2);
            DocPartId docPartId2 = new DocPartId(){ Val = "{00F3F2EC-0290-443B-9815-66648EE1ADF9}" };

            docPartProperties2.Append(docPartName2);
            docPartProperties2.Append(category2);
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs

示例8: GenerateHeaderPart1Content

        // Generates content of headerPart1.
        private void GenerateHeaderPart1Content(HeaderPart headerPart1)
        {
            Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se wp14" } };
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
            header1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
            header1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            header1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph371 = new Paragraph() { RsidParagraphAddition = "0094109A", RsidParagraphProperties = "00624202", RsidRunAdditionDefault = "0094109A", ParagraphId = "0AAC1AD1", TextId = "295351A7" };

            ParagraphProperties paragraphProperties368 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId28 = new ParagraphStyleId() { Val = "Footer" };
            WidowControl widowControl1 = new WidowControl() { Val = false };
            Indentation indentation25 = new Indentation() { End = "360" };

            paragraphProperties368.Append(paragraphStyleId28);
            paragraphProperties368.Append(widowControl1);
            paragraphProperties368.Append(indentation25);

            Run run755 = new Run();

            RunProperties runProperties797 = new RunProperties();
            NoProof noProof4 = new NoProof();

            runProperties797.Append(noProof4);

            Drawing drawing2 = new Drawing();

            Wp.Inline inline1 = new Wp.Inline() { DistanceFromTop = (UInt32Value)0U, DistanceFromBottom = (UInt32Value)0U, DistanceFromLeft = (UInt32Value)0U, DistanceFromRight = (UInt32Value)0U, AnchorId = "0AAC1AD5", EditId = "0AAC1AD6" };
            Wp.Extent extent2 = new Wp.Extent() { Cx = 1238250L, Cy = 190500L };
            Wp.EffectExtent effectExtent2 = new Wp.EffectExtent() { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L };
            Wp.DocProperties docProperties2 = new Wp.DocProperties() { Id = (UInt32Value)1U, Name = "Picture 1" };

            Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties2 = new Wp.NonVisualGraphicFrameDrawingProperties();

            A.GraphicFrameLocks graphicFrameLocks2 = new A.GraphicFrameLocks() { NoChangeAspect = true };
            graphicFrameLocks2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

            nonVisualGraphicFrameDrawingProperties2.Append(graphicFrameLocks2);

            A.Graphic graphic2 = new A.Graphic();
            graphic2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

            A.GraphicData graphicData2 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" };

            Pic.Picture picture2 = new Pic.Picture();
            picture2.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture");

            Pic.NonVisualPictureProperties nonVisualPictureProperties2 = new Pic.NonVisualPictureProperties();
            Pic.NonVisualDrawingProperties nonVisualDrawingProperties2 = new Pic.NonVisualDrawingProperties() { Id = (UInt32Value)0U, Name = "Picture 1" };

            Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties2 = new Pic.NonVisualPictureDrawingProperties();
            A.PictureLocks pictureLocks2 = new A.PictureLocks() { NoChangeAspect = true, NoChangeArrowheads = true };

            nonVisualPictureDrawingProperties2.Append(pictureLocks2);

            nonVisualPictureProperties2.Append(nonVisualDrawingProperties2);
            nonVisualPictureProperties2.Append(nonVisualPictureDrawingProperties2);

            Pic.BlipFill blipFill2 = new Pic.BlipFill();

            A.Blip blip2 = new A.Blip() { Embed = "rId1" };

            A.BlipExtensionList blipExtensionList2 = new A.BlipExtensionList();

            A.BlipExtension blipExtension2 = new A.BlipExtension() { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" };

            A14.UseLocalDpi useLocalDpi2 = new A14.UseLocalDpi() { Val = false };
            useLocalDpi2.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main");

            blipExtension2.Append(useLocalDpi2);

            blipExtensionList2.Append(blipExtension2);

            blip2.Append(blipExtensionList2);
            A.SourceRectangle sourceRectangle2 = new A.SourceRectangle();

            A.Stretch stretch2 = new A.Stretch();
            A.FillRectangle fillRectangle2 = new A.FillRectangle();

            stretch2.Append(fillRectangle2);

            blipFill2.Append(blip2);
//.........这里部分代码省略.........
开发者ID:RoryNorman,项目名称:PowerShell,代码行数:101,代码来源:Program.cs

示例9: GenerateTable

        // Creates an Table instance and adds its children.
        public static Table GenerateTable(Document doc, System.Data.DataTable datetable)
        {
            Table table = new Table();
            //
            PageSize pagesize = doc.Body.Descendants<PageSize>().First();
            PageMargin pagemargin = doc.Body.Descendants<PageMargin>().First();
            //
            var AvailableSumWidth = (int)(pagesize.Width - pagemargin.Right - pagemargin.Left);

            TableBorders tborder = new Func<TableBorders>(delegate()
            {
                TableBorders tableBorders1 = new TableBorders();
                TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

                tableBorders1.Append(topBorder1);
                tableBorders1.Append(leftBorder1);
                tableBorders1.Append(bottomBorder1);
                tableBorders1.Append(rightBorder1);
                tableBorders1.Append(insideHorizontalBorder1);
                tableBorders1.Append(insideVerticalBorder1);
                return tableBorders1;
            })();

            table.AppendChild<TableProperties>(new TableProperties(
               new TableStyle() { Val = "a7" },
               tborder,
               new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto },
               new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }
            ));

            int sumColumn = datetable.Columns.Count;

            int averwidth = AvailableSumWidth / sumColumn;

            Double set_colSumW = 0;
            int remainSumW = 0;
            foreach (System.Data.DataColumn item in datetable.Columns)
            {
                Object col_w = item.ExtendedProperties["width"];
                if (col_w != null) { set_colSumW += Convert.ToDouble(col_w); remainSumW += averwidth; }
            }

            foreach (System.Data.DataColumn item in datetable.Columns)
            {
                Object col_w = item.ExtendedProperties["width"];
                if (col_w != null) item.ExtendedProperties.Add("WordWidth", Math.Floor((remainSumW * Convert.ToDouble(col_w) / set_colSumW)));
                else item.ExtendedProperties.Add("WordWidth", averwidth);
            }

            for (int i = 0; i < sumColumn; i++)
            {
                int col_w = Convert.ToInt32(datetable.Columns[i].ExtendedProperties["WordWidth"]);
                table.AppendChild<GridColumn>(new GridColumn() { Width = col_w.ToString() });
            }
            List<System.Data.DataRow> lstCol = new List<System.Data.DataRow>();
            System.Data.DataRow dr = datetable.NewRow();
            List<object> lstObj = new List<object>();

            foreach (System.Data.DataColumn item in datetable.Columns)
            {
                lstObj.Add(item.ColumnName);
            }

            dr.ItemArray = lstObj.ToArray();
            datetable.Rows.InsertAt(dr, 0);

            foreach (System.Data.DataRow item in datetable.Rows)
            {
                TableRow tableRow = new TableRow() { RsidTableRowAddition = "00D24D12", RsidTableRowProperties = "00D24D12" };
                for (int i = 0; i < sumColumn; i++)
                {
                    int col_w = Convert.ToInt32(datetable.Columns[i].ExtendedProperties["WordWidth"]);

                    string cellValue = item[i].ToString();
                    TableCell tableCell1 = new TableCell();

                    TableCellProperties tableCellProperties1 = new TableCellProperties();
                    TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = col_w.ToString(), Type = TableWidthUnitValues.Dxa };

                    tableCellProperties1.Append(tableCellWidth1);

                    Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00D24D12", RsidParagraphProperties = "003246FB", RsidRunAdditionDefault = "00D24D12" };

                    Run run1 = new Run();

                    RunProperties runProperties1 = new RunProperties();
                    RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

                    runProperties1.Append(runFonts1);
                    Text text1 = new Text();
                    text1.Text = cellValue;

                    run1.Append(runProperties1);
                    run1.Append(text1);
//.........这里部分代码省略.........
开发者ID:y0y0alice,项目名称:OA,代码行数:101,代码来源:CreateTable.cs

示例10: Print

        public static void Print(Ticket SelectedTicket, string path)
        {
            string fileName = SelectedTicket.TicketHolder.Trim() + SelectedTicket.TicketType.Name.Trim() + ".docx";
            string finalPath = path + "\\" + fileName;

            string code = SelectedTicket.TicketHolder + SelectedTicket.ID;

            try
            {
                File.Copy("template.docx", finalPath, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            WordprocessingDocument doc = WordprocessingDocument.Open(finalPath, true);
            IDictionary<string, BookmarkStart> bookmarks = new Dictionary<string, BookmarkStart>();

            foreach (BookmarkStart bms in doc.MainDocumentPart.RootElement.Descendants<BookmarkStart>())
            {
                bookmarks[bms.Name] = bms;
            }
            string TicketCode = SelectedTicket.ID + SelectedTicket.TicketHolder[0] + SelectedTicket.TicketHolder[1] + SelectedTicket.TicketHolder[2];
            bookmarks["TicketName"].Parent.InsertAfter<Run>(new Run(new Text("Electronic Rampage")), bookmarks["TicketName"]);
            bookmarks["Name"].Parent.InsertAfter<Run>(new Run(new Text(SelectedTicket.TicketHolder)), bookmarks["Name"]);
            bookmarks["Code"].Parent.InsertAfter<Run>(new Run(new Text(TicketCode)), bookmarks["Code"]);
            bookmarks["TicketType"].Parent.InsertAfter<Run>(new Run(new Text(SelectedTicket.TicketType.Name)), bookmarks["TicketType"]);

            Run run = new Run(new Text(code));
            RunProperties prop = new RunProperties();
            RunFonts font = new RunFonts() { Ascii = "Free 3 of 9 Extended", HighAnsi = "Free 3 of 9 Extended" };
            FontSize size = new FontSize() { Val = SelectedTicket.ID.ToString() };

            prop.Append(font);
            prop.Append(size);
            run.PrependChild<RunProperties>(prop);

            bookmarks["Barcode"].Parent.InsertAfter<Run>(run, bookmarks["Barcode"]);

            doc.Close();
            System.Windows.MessageBox.Show("Ticket is aangemaakt");
        }
开发者ID:Krynox,项目名称:2NCMTCSharp,代码行数:43,代码来源:TicketingViewModel.cs

示例11: GenerateFooterPart1Content

        // Generates content of footerPart1.
        private void GenerateFooterPart1Content(FooterPart footerPart1)
        {
            Footer footer1 = new Footer() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            footer1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            footer1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            footer1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            footer1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            footer1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            footer1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            footer1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph51 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" };

            ParagraphProperties paragraphProperties49 = new ParagraphProperties();
            WidowControl widowControl49 = new WidowControl() { Val = false };

            ParagraphBorders paragraphBorders1 = new ParagraphBorders();
            TopBorder topBorder18 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)5U };

            paragraphBorders1.Append(topBorder18);
            AutoSpaceDE autoSpaceDE49 = new AutoSpaceDE() { Val = false };
            AutoSpaceDN autoSpaceDN49 = new AutoSpaceDN() { Val = false };
            AdjustRightIndent adjustRightIndent49 = new AdjustRightIndent() { Val = false };
            SpacingBetweenLines spacingBetweenLines35 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification10 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties49 = new ParagraphMarkRunProperties();
            RunFonts runFonts91 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" };
            FontSize fontSize91 = new FontSize() { Val = "18" };
            FontSizeComplexScript fontSizeComplexScript91 = new FontSizeComplexScript() { Val = "18" };

            paragraphMarkRunProperties49.Append(runFonts91);
            paragraphMarkRunProperties49.Append(fontSize91);
            paragraphMarkRunProperties49.Append(fontSizeComplexScript91);

            paragraphProperties49.Append(widowControl49);
            paragraphProperties49.Append(paragraphBorders1);
            paragraphProperties49.Append(autoSpaceDE49);
            paragraphProperties49.Append(autoSpaceDN49);
            paragraphProperties49.Append(adjustRightIndent49);
            paragraphProperties49.Append(spacingBetweenLines35);
            paragraphProperties49.Append(justification10);
            paragraphProperties49.Append(paragraphMarkRunProperties49);

            Run run43 = new Run();

            RunProperties runProperties43 = new RunProperties();
            RunFonts runFonts92 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" };
            FontSize fontSize92 = new FontSize() { Val = "18" };
            FontSizeComplexScript fontSizeComplexScript92 = new FontSizeComplexScript() { Val = "18" };

            runProperties43.Append(runFonts92);
            runProperties43.Append(fontSize92);
            runProperties43.Append(fontSizeComplexScript92);
            Text text43 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text43.Text = "Страница ";

            run43.Append(runProperties43);
            run43.Append(text43);

            Run run44 = new Run();

            RunProperties runProperties44 = new RunProperties();
            RunFonts runFonts93 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" };
            FontSize fontSize93 = new FontSize() { Val = "18" };
            FontSizeComplexScript fontSizeComplexScript93 = new FontSizeComplexScript() { Val = "18" };

            runProperties44.Append(runFonts93);
            runProperties44.Append(fontSize93);
            runProperties44.Append(fontSizeComplexScript93);
            FieldChar fieldChar1 = new FieldChar() { FieldCharType = FieldCharValues.Begin };

            run44.Append(runProperties44);
            run44.Append(fieldChar1);

            Run run45 = new Run();

            RunProperties runProperties45 = new RunProperties();
            RunFonts runFonts94 = new RunFonts() { Ascii = "New Roman", HighAnsi = "New Roman", EastAsia = "New Roman", ComplexScript = "Times New Roman" };
            FontSize fontSize94 = new FontSize() { Val = "18" };
            FontSizeComplexScript fontSizeComplexScript94 = new FontSizeComplexScript() { Val = "18" };

            runProperties45.Append(runFonts94);
            runProperties45.Append(fontSize94);
            runProperties45.Append(fontSizeComplexScript94);
            FieldCode fieldCode1 = new FieldCode();
            fieldCode1.Text = "PAGE";

            run45.Append(runProperties45);
            run45.Append(fieldCode1);

//.........这里部分代码省略.........
开发者ID:rymbln,项目名称:Spec_Soft,代码行数:101,代码来源:GeneratedPatientContract.cs

示例12: GenerateMainDocumentPart1Content

        // Generates content of mainDocumentPart1.
        private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
        {
            Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
            document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Body body1 = new Body();

            Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00AB286F", RsidParagraphAddition = "00BC116E", RsidParagraphProperties = "00BC116E", RsidRunAdditionDefault = "00BC116E" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();

            ParagraphBorders paragraphBorders1 = new ParagraphBorders();
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)1U };

            paragraphBorders1.Append(bottomBorder1);

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            RunFonts runFonts1 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold1 = new Bold();
            FontSize fontSize1 = new FontSize() { Val = "26" };

            paragraphMarkRunProperties1.Append(runFonts1);
            paragraphMarkRunProperties1.Append(bold1);
            paragraphMarkRunProperties1.Append(fontSize1);

            paragraphProperties1.Append(paragraphBorders1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run() { RsidRunProperties = "00AB286F" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold2 = new Bold();
            FontSize fontSize2 = new FontSize() { Val = "26" };

            runProperties1.Append(runFonts2);
            runProperties1.Append(bold2);
            runProperties1.Append(fontSize2);
            Text text1 = new Text();
            text1.Text = "Monthly Freight Report";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run() { RsidRunAddition = "00D26AC8" };

            RunProperties runProperties2 = new RunProperties();
            RunFonts runFonts3 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold3 = new Bold();
            FontSize fontSize3 = new FontSize() { Val = "26" };

            runProperties2.Append(runFonts3);
            runProperties2.Append(bold3);
            runProperties2.Append(fontSize3);
            Text text2 = new Text();
            text2.Text = ": " + title;

            run2.Append(runProperties2);
            run2.Append(text2);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);

            Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "004C4FC4", RsidParagraphAddition = "00BC116E", RsidRunAdditionDefault = "00BC116E" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunFonts runFonts4 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };

            paragraphMarkRunProperties2.Append(runFonts4);

            paragraphProperties2.Append(paragraphMarkRunProperties2);

            paragraph2.Append(paragraphProperties2);

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
            TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };

            TableBorders tableBorders1 = new TableBorders();
//.........这里部分代码省略.........
开发者ID:CGHill,项目名称:Hard-To-Find,代码行数:101,代码来源:FreightReportCreator.cs

示例13: GeneratePartContent

        // Generates content of part.
        private static void GeneratePartContent(MainDocumentPart part)
        {
            Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
            document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Body body1 = new Body();

            Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "00933EBD", RsidParagraphAddition = "00C20112", RsidParagraphProperties = "00C20112", RsidRunAdditionDefault = "00C20112" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "480", Line = "360", LineRule = LineSpacingRuleValues.Auto };
            Justification justification6 = new Justification() { Val = JustificationValues.Center };
            OutlineLevel outlineLevel1 = new OutlineLevel() { Val = 0 };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            FontSize fontSize9 = new FontSize() { Val = "48" };
            FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "30" };
            Underline underline2 = new Underline() { Val = UnderlineValues.Single };

            paragraphMarkRunProperties1.Append(fontSize9);
            paragraphMarkRunProperties1.Append(fontSizeComplexScript10);
            paragraphMarkRunProperties1.Append(underline2);

            paragraphProperties1.Append(spacingBetweenLines1);
            paragraphProperties1.Append(justification6);
            paragraphProperties1.Append(outlineLevel1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run5 = new Run() { RsidRunProperties = "00933EBD" };

            RunProperties runProperties1 = new RunProperties();
            FontSize fontSize10 = new FontSize() { Val = "48" };
            FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "30" };
            Underline underline3 = new Underline() { Val = UnderlineValues.Single };

            runProperties1.Append(fontSize10);
            runProperties1.Append(fontSizeComplexScript11);
            runProperties1.Append(underline3);
            Text text1 = new Text();
            text1.Text = "Memorandum";

            run5.Append(runProperties1);
            run5.Append(text1);

            paragraph5.Append(paragraphProperties1);
            paragraph5.Append(run5);

            Paragraph paragraph6 = new Paragraph() { RsidParagraphAddition = "00C20112", RsidParagraphProperties = "00594F7D", RsidRunAdditionDefault = "00C20112" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            WordWrap wordWrap1 = new WordWrap() { Val = false };
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { Line = "360", LineRule = LineSpacingRuleValues.Auto };
            Justification justification7 = new Justification() { Val = JustificationValues.Right };

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            FontSize fontSize11 = new FontSize() { Val = "24" };
            FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "30" };

            paragraphMarkRunProperties2.Append(fontSize11);
            paragraphMarkRunProperties2.Append(fontSizeComplexScript12);

            paragraphProperties2.Append(wordWrap1);
            paragraphProperties2.Append(spacingBetweenLines2);
            paragraphProperties2.Append(justification7);
            paragraphProperties2.Append(paragraphMarkRunProperties2);

            Run run6 = new Run();

            RunProperties runProperties2 = new RunProperties();
            FontSize fontSize12 = new FontSize() { Val = "24" };
            FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "30" };

            runProperties2.Append(fontSize12);
            runProperties2.Append(fontSizeComplexScript13);
            Text text2 = new Text();
            text2.Text = "Case No.:";

            run6.Append(runProperties2);
            run6.Append(text2);

            Run run7 = new Run() { RsidRunAddition = "00594F7D" };

            RunProperties runProperties3 = new RunProperties();
            FontSize fontSize13 = new FontSize() { Val = "24" };
//.........这里部分代码省略.........
开发者ID:crazytan,项目名称:Memo,代码行数:101,代码来源:Memo.cs

示例14: GenerateTitlePage

        //генерирует титульную страницу
        private void GenerateTitlePage()
        {
            var titlePage = _sessionObjects.TitlePage;

            var paragraph = new Paragraph();
            var paraProp = GetParagraphProperties("StyleWithoutIndentation");
            var runProp = new RunProperties();
            var run = new Run();
            var runs = new List<Run>();

            runProp = new RunProperties();
            runProp.Append(new Bold());
            run = new Run();
            run.Append(runProp);
            //TODO: поменять " на "«" "»"
            run.Append(new Text(titlePage.University.ToUpper()));
            GenerateParagraph(run, paraProp);

            GenerateParagraph();
            GenerateParagraph();

            runProp = new RunProperties();
            runProp.Append(new Bold());
            run = new Run();
            run.Append(runProp);
            run.Append(new Text("УТВЕРЖДАЮ:"));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Indentation() { Left = "5812" });
            GenerateParagraph(run, paraProp);

            run = new Run();
            run.Append(new Text(titlePage.CreatorPost));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Indentation() { Left = "5812" });
            GenerateParagraph(run, paraProp);

            run = new Run();
            run.Append(new Text("_________________________"));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Indentation() { Left = "5812" });
            GenerateParagraph(run, paraProp);

            run = new Run();
            run.Append(new Text(titlePage.CreatorName));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Justification() { Val = JustificationValues.Right });
            GenerateParagraph(run, paraProp);

            run = new Run();
            run.Append(new Text("«__»______________ 2012 г."));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Indentation() { Left = "5812" });
            GenerateParagraph(run, paraProp);

            GenerateParagraph();
            GenerateParagraph();
            GenerateParagraph();

            runProp = new RunProperties();
            runProp.Append(new Bold());
            run = new Run();
            run.Append(runProp);
            run.Append(new Text("РАБОЧАЯ ПРОГРАММА ДИСЦИПЛИНЫ"));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Justification() { Val = JustificationValues.Center });
            GenerateParagraph(run, paraProp);

            runProp = new RunProperties();
            runProp.Append(new Bold());
            run = new Run();
            run.Append(runProp);
            run.Append(new Text("«" + titlePage.Discipline + "»"));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Justification() { Val = JustificationValues.Center });
            GenerateParagraph(run, paraProp);

            GenerateParagraph();

            runProp = new RunProperties();
            runProp.Append(new Bold());
            run = new Run();
            run.Append(runProp);
            run.Append(new Text(titlePage.DisciplineCode));
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            paraProp.Append(new Justification() { Val = JustificationValues.Center });
            GenerateParagraph(run, paraProp);

            GenerateParagraph();

            runProp = new RunProperties();
            runProp.Append(new Bold());
            runs = new List<Run>();
            run = new Run();
            run.Append(runProp);
            run.Append(new Text("Направление подготовки: ") { Space = SpaceProcessingModeValues.Preserve });
            runs.Add(run);
            run = new Run();
            run.Append(new Text(titlePage.TrainingDirection));
            runs.Add(run);
//.........这里部分代码省略.........
开发者ID:silmarion,项目名称:WPDHelper,代码行数:101,代码来源:DocBuilder.cs

示例15: GenerateChapterOne

        private void GenerateChapterOne()
        {
            var cos = _sessionObjects.ChapterOne;

            var paragraph = new Paragraph();
            var runProp = new RunProperties();
            var run = new Run();
            var runs = new List<Run>();

            run.Append(new Text("1. Цели освоения дисциплины"));
            var paraProp = GetParagraphProperties("Header1");
            GenerateParagraph(run, paraProp);

            runProp = new RunProperties();
            runProp.Append(new Bold());
            runs = new List<Run>();
            run = new Run();
            run.Append(runProp);
            run.Append(new Text("Целями освоения дисциплины ") { Space = SpaceProcessingModeValues.Preserve });
            runs.Add(run);
            run = new Run();
            var discipName = _sessionObjects.TitlePage.Discipline;
            run.Append(new Text("«" + discipName + "» является ") { Space = SpaceProcessingModeValues.Preserve });
            runs.Add(run);
            run = new Run();
            run.Append( new Text(cos.DisciplineMission) );
            runs.Add(run);
            GenerateParagraph(runs);
            GenerateParagraph();

            runProp = new RunProperties { Bold = new Bold ()};
            run = new Run { RunProperties = runProp };
            run.Append(new Text("Основными обобщенными задачами дисциплины являются:"));
            GenerateParagraph(run);

            runProp = new RunProperties { Italic = new Italic() };
            run = new Run { RunProperties = runProp };
            run.Append(new Text("Профессиональная деятельность"));
            GenerateParagraph(run);
            for(var i = 0; i < cos.ProfessionalActivity.Rows.Count; i++)
            {
                paraProp = GetListProperties();
                run = new Run();
                var row = cos.ProfessionalActivity.Rows[i][0];
                run.Append(new Text(Convert.ToString(row)) );
                GenerateParagraph(run, paraProp);
            }

            runProp = new RunProperties { Italic = new Italic() };
            run = new Run { RunProperties = runProp };
            run.Append(new Text("Производственно-технологическая деятельность"));
            GenerateParagraph(run);
            for (var i = 0; i < cos.TechnologicalActivity.Rows.Count; i++)
            {
                paraProp = GetListProperties();
                run = new Run();
                var row = cos.TechnologicalActivity.Rows[i][0];
                run.Append(new Text(Convert.ToString(row)));
                GenerateParagraph(run, paraProp);
            }

            runProp = new RunProperties { Italic = new Italic() };
            run = new Run { RunProperties = runProp };
            run.Append(new Text("Организационно-управленческая деятельность"));
            GenerateParagraph(run);
            for (var i = 0; i < cos.AdministrativeActivity.Rows.Count; i++)
            {
                paraProp = GetListProperties();
                run = new Run();
                var row = cos.AdministrativeActivity.Rows[i][0];
                run.Append(new Text(Convert.ToString(row)));
                GenerateParagraph(run, paraProp);
            }

            runProp = new RunProperties { Italic = new Italic() };
            run = new Run { RunProperties = runProp };
            run.Append(new Text("Аналитическая деятельность"));
            GenerateParagraph(run);
            for (var i = 0; i < cos.AnalyticalActivity.Rows.Count; i++)
            {
                paraProp = GetListProperties();
                run = new Run();
                var row = cos.AnalyticalActivity.Rows[i][0];
                run.Append(new Text(Convert.ToString(row)));
                GenerateParagraph(run, paraProp);
            }

            runProp = new RunProperties { Italic = new Italic() };
            run = new Run { RunProperties = runProp };
            run.Append(new Text("Научно-исследовательская деятельность"));
            GenerateParagraph(run);
            for (var i = 0; i < cos.ResearchActivity.Rows.Count; i++)
            {
                paraProp = GetListProperties();
                run = new Run();
                var row = cos.ResearchActivity.Rows[i][0];
                run.Append(new Text(Convert.ToString(row)));
                GenerateParagraph(run, paraProp);
            }

//.........这里部分代码省略.........
开发者ID:silmarion,项目名称:WPDHelper,代码行数:101,代码来源:DocBuilder.cs


注:本文中的RunProperties.Append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。