예제 #1
0
 public static ParagraphsType CreateParagraphs(string value, StyleType style)
 {
     var paragraphs = new ParagraphsType();
     var pgr = new Paragraph();
     var txtRuns = new TextRunsType();
     var v = new LocIDStringWithDataTypeAttribute {Value = value};
     txtRuns.TextRun = new[] { new TextRun{Value = v, Style=style}.Create() };
     pgr.TextRuns = txtRuns;
     if (style != null)
     {
         pgr.Style = style;
     }
     paragraphs.Paragraph = new[] { pgr.Create() };
     return paragraphs;
 }
예제 #2
0
 public static ParagraphsType CreateParagraphs(string value, StyleType style)
 {
     ParagraphsType paragraphs = new ParagraphsType();
     Paragraph pgr = new Paragraph();
     TextRunsType txtRuns = new TextRunsType();
     LocIDStringWithDataTypeAttribute v = new LocIDStringWithDataTypeAttribute();
     v.Value = value;
     txtRuns.TextRun = new TextRunType[] { new TextRun() {
         Value = v, Style=style
     }.Create() };
     pgr.TextRuns = txtRuns;
     if (style != null)
     {
         pgr.Style = style;
     }
     paragraphs.Paragraph = new ParagraphType[] { pgr.Create() };
     return paragraphs;
 }