public Inline Parse(ParserContext context, Subject subject) { if (!CanParse(subject)) { return(null); } var saved = subject.Save(); var emphChar = subject.Char; int startCount; int endCount; if (CanOpen(subject, emphChar, out startCount)) { subject.Advance(startCount); var inlines = new List <Inline>(); while (!subject.EndOfString) { if (CanClose(subject, emphChar, startCount, out endCount)) { if (startCount == 1) { subject.Advance(1); return(new Emphasis(inlines)); } else if (startCount == 2) { subject.Advance(2); return(new StrongEmphasis(inlines)); } else { subject.Advance(endCount); if (endCount == 1) { var emphasis = new Emphasis(inlines); inlines.Clear(); inlines.Add(emphasis); startCount = 2; } else if (endCount == 2) { var strongEmphasis = new StrongEmphasis(inlines); inlines.Clear(); inlines.Add(strongEmphasis); startCount = 1; } else { return(new StrongEmphasis(new Emphasis(inlines))); } } } if (subject.EndOfString) { break; } else { var inline = Parsers.CommonMarkInlineParser.Parse(context, subject); if (inline == null) { saved.Restore(); return(null); } inlines.Add(inline); } } } saved.Restore(); return(new InlineString(subject.TakeWhile(emphChar))); }
public void StartEmphasis(Emphasis e) { writer.Write("<em>"); }
public void EndEmphasis(Emphasis e) { writer.Write("</em>"); }
private static void SetInlineContent(INodeContainer<CommonMark.Inline> owner, Syntax.Inline inl) { while (inl != null) { CommonMark.Inline result = null; switch (inl.Tag) { case Syntax.InlineTag.String: result = new Text(inl.Content.Literal); break; case Syntax.InlineTag.SoftBreak: result = new Softbreak(); break; case Syntax.InlineTag.LineBreak: result = new Linebreak(); break; case Syntax.InlineTag.Code: result = new CodeSpan(inl.Content.Literal); break; case Syntax.InlineTag.RawHtml: result = new RawHtml(inl.Content.Literal); break; case Syntax.InlineTag.Entity: result = new TextEntity(inl.Content.Literal); break; case Syntax.InlineTag.Emphasis: result = new Emphasis(); break; case Syntax.InlineTag.Strong: result = new Strong(); break; case Syntax.InlineTag.Link: result = new Link(); break; case Syntax.InlineTag.Image: result = new Image(); break; default: throw new Exception("Invalid value for InlineTag"); } if (result is Linkable) { ((Linkable)result).Title = inl.Content.Linkable.Title; ((Linkable)result).Url = inl.Content.Linkable.Url; SetInlineContent((Linkable)result, inl.Content.Linkable.Label); } if (result is CommonMark.INodeContainer<CommonMark.Inline>) SetInlineContent((CommonMark.INodeContainer<CommonMark.Inline>)result, inl.Content.Inlines); if (result != null) owner.Append(result); inl = inl.Next; } }
public void CorrectData(string text, string expected) { Emphasis testObject = new Emphasis(text); Assert.Equal(text, testObject.Text); }
public void StartEmphasis(Emphasis e) { Write("emph"); indent += IndentBy; }
public CustomLabel(Emphasis textLayer) : base() { TextEmphasis = textLayer; }
/// <summary> /// Determines whether the specified <see cref="Emphasis" />, is equal to this instance. /// </summary> /// <param name="other">The other.</param> /// <returns>true if equal; otherwise, false</returns> protected bool Equals(Emphasis other) => Equals(Attributes, other.Attributes) && DoubleDelimited == other.DoubleDelimited && string.Equals(Text, other.Text);
public static string SayWithEmphasis(string text, Emphasis emphasis) => $"<emphasis level='{emphasis}'>{text}</emphasis>";
public void StartEmphasis(Emphasis e) { if (empCnt == 0) Write("*"); empCnt++; }
public void EndEmphasis(Emphasis e) { empCnt--; if (empCnt == 0) Write("*"); }
public BorderedPanel(Layer layer, Emphasis emphasis) : base(layer, emphasis) { // Default the tag, because it would not make much sense to use this control without making use of this feature. Tag = "Missing tag!"; }
public CustomPanel(Layer drawingLayer, Emphasis textEmphasis) : base() { DoubleBuffered = true; DrawingLayer = drawingLayer; TextEmphasis = textEmphasis; }
public CustomToolStripMenuItem(Layer drawingLayer, Emphasis textEmphasis) { DrawingLayer = drawingLayer; TextEmphasis = textEmphasis; }
public CustomButton(Layer drawingLayer, Emphasis textEmphasis) : base() { DrawingLayer = drawingLayer; TextEmphasis = textEmphasis; }
protected override void vmethod_0() { base.method_59(int_1); if (this.bool_3) { base.method_4(SprmCode.CFFldVanish, true); } if (base.wordAttrCollection_0 != null) { WordAttrCollection attrs = null; if ((base.wordAttrCollection_0 as CharacterFormat).IsChangedFormat) { WordAttrCollection attrs2 = base.wordAttrCollection_0.Clone() as WordAttrCollection; attrs2.method_42(base.wordAttrCollection_0.FormatRevision.method_4()); attrs2.Remove(0x69); attrs = attrs2; base.wordAttrCollection_0 = base.wordAttrCollection_0.FormatRevision.method_4(); } CharacterFormat format = base.wordAttrCollection_0 as CharacterFormat; if ((format != null) && !string.IsNullOrEmpty(format.CharStyleName)) { Style style = base.wordAttrCollection_0.Document.Styles.DocStyleCollection.FindByName(format.CharStyleName); if (style != null) { base.method_16(SprmCode.CIstd, style.StyleDocId); } } for (int i = 0; i < base.wordAttrCollection_0.Count; i++) { int num5 = base.wordAttrCollection_0.method_18(i); object obj2 = base.wordAttrCollection_0.method_19(i); base.method_60(num5); int num = num5; if (num <= 230) { if (num <= 110) { if (num <= 0x2d) { if (num <= 20) { switch (num) { case 10: base.method_8(SprmCode.CFSpecVanish, obj2); break; case 12: if ((base.wordAttrCollection_0 as CharacterFormat).IsDeleteRevision) { this.method_69(false); } break; case 14: if ((base.wordAttrCollection_0 as CharacterFormat).IsInsertRevision) { this.method_69(true); } break; case 20: { int index = Class1006.list_0.IndexOf((Color)obj2); if (index >= 0) { base.method_22(SprmCode.CHighlight, index); } break; } } } else { switch (num) { case 30: { base.method_19(SprmCode.CCharacterRsid, obj2); continue; } case 40: { base.method_19(SprmCode.CInsertRsid, obj2); continue; } } if (num == 0x2d) { base.method_8(SprmCode.CLineBreakClear, obj2); } } } else if (num <= 80) { switch (num) { case 60: { this.method_67(60, SprmCode.CFBold, obj2); continue; } case 70: { this.method_67(70, SprmCode.CFItalic, obj2); continue; } } if (num == 80) { this.method_67(80, SprmCode.CFStrike, obj2); } } else { switch (num) { case 90: { base.method_8(SprmCode.CFOutline, obj2); continue; } case 100: { this.method_67(100, SprmCode.CFShadow, obj2); continue; } } if (num == 110) { this.method_67(110, SprmCode.CFSmallCaps, obj2); } } } else if (num <= 170) { if (num <= 140) { switch (num) { case 120: { this.method_67(120, SprmCode.CFCaps, obj2); continue; } case 130: { this.method_67(130, SprmCode.CFVanish, obj2); continue; } } if (num == 140) { base.method_8(SprmCode.CKul, obj2); } } else { switch (num) { case 150: { base.method_17(SprmCode.CDxaSpace, obj2, 20f); continue; } case 160: { base.method_21(SprmCode.CIco, obj2); continue; } } if (num == 170) { base.method_8(SprmCode.CFEmboss, obj2); } } } else if (num <= 200) { switch (num) { case 180: { base.method_8(SprmCode.CFImprint, obj2); continue; } case 190: { base.method_17(SprmCode.CHps, obj2, 2f); continue; } } if (num == 200) { base.method_17(SprmCode.CHpsPos, obj2, 2f); } } else { switch (num) { case 210: { base.method_8(SprmCode.CIss, obj2); continue; } case 220: { base.method_17(SprmCode.CHpsKern, obj2, 2f); continue; } } if (num == 230) { this.method_68(SprmCode.CFtcAscii, obj2); } } } else if (num <= 350) { if (num <= 270) { if (num <= 250) { switch (num) { case 0xeb: { this.method_68(SprmCode.CFtcFarEast, obj2); continue; } case 240: { this.method_68(SprmCode.CFtcOther, obj2); continue; } } if (num == 250) { this.method_67(250, SprmCode.CFBoldBi, obj2); } } else { switch (num) { case 0x10c: base.method_8(SprmCode.CFComplexScript, obj2); break; case 270: this.method_68(SprmCode.CFtcBi, obj2); break; case 0x109: base.method_8(SprmCode.CFBiDi, obj2); break; case 260: this.method_67(260, SprmCode.CFItalicBi, obj2); break; } } } else if (num <= 310) { switch (num) { case 290: { base.method_16(SprmCode.CCharScale, obj2); continue; } case 300: { base.method_8(SprmCode.CFDStrike, obj2); continue; } } if (num == 310) { base.method_8(SprmCode.CSfxText, obj2); } } else { switch (num) { case 330: { base.method_8(SprmCode.CFUsePgsuSettings, obj2); continue; } case 340: { base.method_16(SprmCode.CLidBi, obj2); continue; } } if (num == 350) { base.method_17(SprmCode.CHpsBi, obj2, 2f); } } } else if (num <= 450) { if (num <= 380) { switch (num) { case 360: { base.method_27(SprmCode.CBrc, obj2, 8f); continue; } case 370: { base.method_33(SprmCode.CShd, obj2); continue; } } if (num == 380) { if (this.method_77().IsNoProof) { base.method_16(SprmCode.CLid_80, 0x400); base.method_16(SprmCode.CLidFarEast_80, 0x400); } else { base.method_16(SprmCode.CLid_80, obj2); if (this.method_77().LocaleIdASCII != this.method_77().LocaleIdFarEast) { base.method_16(SprmCode.CLidFarEast_80, this.method_77().method_31(390)); } } } } else { switch (num) { case 400: { base.method_8(SprmCode.CIdctHint, obj2); continue; } case 440: { base.method_8(SprmCode.CFNoProof, obj2); continue; } } if (num == 450) { base.method_24(SprmCode.CUnderlineColor, obj2); } } } else if (num <= 490) { switch (num) { case 460: { if (base.wordAttrCollection_0.method_6(460)) { base.class345_0.method_5(SprmCode.CYsri); HyphenRule rule = (HyphenRule)base.wordAttrCollection_0.method_32(460); base.class345_0.Write((byte)rule); int num3 = (int)base.wordAttrCollection_0.method_32(470); base.class345_0.Write((byte)num3); } continue; } case 480: { base.method_19(SprmCode.CPbiIBullet, obj2); continue; } } if (num == 490) { base.method_16(SprmCode.CPbiGrf, obj2); } } else if (num != 600) { if (num == 770) { Emphasis emphasis = (Emphasis)obj2; if (emphasis != Emphasis.None) { base.method_8(SprmCode.CKcd, (byte)emphasis); } } else if (num == 780) { this.method_72((Class340)obj2); } } } base.method_61(); if (attrs != null) { base.wordAttrCollection_0 = attrs; attrs = null; base.method_46(SprmCode.CPropRMark, SprmCode.CWall); } } }
// Creates an Numbering instance and adds its children. public static Numbering GenerateNumbering() { Numbering numbering1 = new Numbering() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se w16cid wp14" } }; numbering1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); numbering1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex"); numbering1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"); numbering1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"); numbering1.AddNamespaceDeclaration("cx3", "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"); numbering1.AddNamespaceDeclaration("cx4", "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"); numbering1.AddNamespaceDeclaration("cx5", "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"); numbering1.AddNamespaceDeclaration("cx6", "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"); numbering1.AddNamespaceDeclaration("cx7", "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"); numbering1.AddNamespaceDeclaration("cx8", "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"); numbering1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); numbering1.AddNamespaceDeclaration("aink", "http://schemas.microsoft.com/office/drawing/2016/ink"); numbering1.AddNamespaceDeclaration("am3d", "http://schemas.microsoft.com/office/drawing/2017/model3d"); numbering1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); numbering1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); numbering1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); numbering1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); numbering1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); numbering1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); numbering1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); numbering1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); numbering1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); numbering1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); numbering1.AddNamespaceDeclaration("w16cid", "http://schemas.microsoft.com/office/word/2016/wordml/cid"); numbering1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex"); numbering1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); numbering1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); numbering1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); numbering1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); AbstractNum abstractNum1 = new AbstractNum() { AbstractNumberId = 0 }; abstractNum1.SetAttribute(new OpenXmlAttribute("w15", "restartNumberingAfterBreak", "http://schemas.microsoft.com/office/word/2012/wordml", "0")); Nsid nsid1 = new Nsid() { Val = "02791BC6" }; MultiLevelType multiLevelType1 = new MultiLevelType() { Val = MultiLevelValues.Multilevel }; TemplateCode templateCode1 = new TemplateCode() { Val = "565C7098" }; Level level1 = new Level() { LevelIndex = 0 }; StartNumberingValue startNumberingValue1 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat1 = new NumberingFormat() { Val = NumberFormatValues.Decimal }; ParagraphStyleIdInLevel paragraphStyleIdInLevel1 = new ParagraphStyleIdInLevel() { Val = "Heading1" }; LevelSuffix levelSuffix1 = new LevelSuffix() { Val = LevelSuffixValues.Nothing }; LevelText levelText1 = new LevelText() { Val = "Article %1" }; LevelJustification levelJustification1 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties1 = new PreviousParagraphProperties(); Indentation indentation1 = new Indentation() { Left = "0", FirstLine = "0" }; previousParagraphProperties1.Append(indentation1); NumberingSymbolRunProperties numberingSymbolRunProperties1 = new NumberingSymbolRunProperties(); RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.Default }; numberingSymbolRunProperties1.Append(runFonts1); level1.Append(startNumberingValue1); level1.Append(numberingFormat1); level1.Append(paragraphStyleIdInLevel1); level1.Append(levelSuffix1); level1.Append(levelText1); level1.Append(levelJustification1); level1.Append(previousParagraphProperties1); level1.Append(numberingSymbolRunProperties1); Level level2 = new Level() { LevelIndex = 1 }; StartNumberingValue startNumberingValue2 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat2 = new NumberingFormat() { Val = NumberFormatValues.Decimal }; ParagraphStyleIdInLevel paragraphStyleIdInLevel2 = new ParagraphStyleIdInLevel() { Val = "Heading2" }; LevelText levelText2 = new LevelText() { Val = "%1.%2" }; LevelJustification levelJustification2 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties2 = new PreviousParagraphProperties(); Tabs tabs1 = new Tabs(); TabStop tabStop1 = new TabStop() { Val = TabStopValues.Number, Position = 720 }; tabs1.Append(tabStop1); Indentation indentation2 = new Indentation() { Left = "0", FirstLine = "0" }; previousParagraphProperties2.Append(tabs1); previousParagraphProperties2.Append(indentation2); NumberingSymbolRunProperties numberingSymbolRunProperties2 = new NumberingSymbolRunProperties(); RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.Default, ComplexScript = "Times New Roman" }; Bold bold1 = new Bold() { Val = false }; Italic italic1 = new Italic() { Val = false }; ItalicComplexScript italicComplexScript1 = new ItalicComplexScript() { Val = false }; Caps caps1 = new Caps() { Val = false }; SmallCaps smallCaps1 = new SmallCaps() { Val = false }; Strike strike1 = new Strike() { Val = false }; DoubleStrike doubleStrike1 = new DoubleStrike() { Val = false }; NoProof noProof1 = new NoProof() { Val = false }; Vanish vanish1 = new Vanish() { Val = false }; Color color1 = new Color() { Val = "000000" }; Spacing spacing1 = new Spacing() { Val = 0 }; Kern kern1 = new Kern() { Val = 0U }; Position position1 = new Position() { Val = "0" }; Underline underline1 = new Underline() { Val = UnderlineValues.None }; TextEffect textEffect1 = new TextEffect() { Val = TextEffectValues.None }; VerticalTextAlignment verticalTextAlignment1 = new VerticalTextAlignment() { Val = VerticalPositionValues.Baseline }; Emphasis emphasis1 = new Emphasis() { Val = EmphasisMarkValues.None }; SpecVanish specVanish1 = new SpecVanish() { Val = false }; OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<w14:shadow w14:blurRad=\"0\" w14:dist=\"0\" w14:dir=\"0\" w14:sx=\"0\" w14:sy=\"0\" w14:kx=\"0\" w14:ky=\"0\" w14:algn=\"none\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\"><w14:srgbClr w14:val=\"000000\" /></w14:shadow>"); OpenXmlUnknownElement openXmlUnknownElement2 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<w14:textOutline w14:w=\"0\" w14:cap=\"rnd\" w14:cmpd=\"sng\" w14:algn=\"ctr\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\"><w14:noFill /><w14:prstDash w14:val=\"solid\" /><w14:bevel /></w14:textOutline>"); numberingSymbolRunProperties2.Append(runFonts2); numberingSymbolRunProperties2.Append(bold1); numberingSymbolRunProperties2.Append(italic1); numberingSymbolRunProperties2.Append(italicComplexScript1); numberingSymbolRunProperties2.Append(caps1); numberingSymbolRunProperties2.Append(smallCaps1); numberingSymbolRunProperties2.Append(strike1); numberingSymbolRunProperties2.Append(doubleStrike1); numberingSymbolRunProperties2.Append(noProof1); numberingSymbolRunProperties2.Append(vanish1); numberingSymbolRunProperties2.Append(color1); numberingSymbolRunProperties2.Append(spacing1); numberingSymbolRunProperties2.Append(kern1); numberingSymbolRunProperties2.Append(position1); numberingSymbolRunProperties2.Append(underline1); numberingSymbolRunProperties2.Append(textEffect1); numberingSymbolRunProperties2.Append(verticalTextAlignment1); numberingSymbolRunProperties2.Append(emphasis1); numberingSymbolRunProperties2.Append(specVanish1); numberingSymbolRunProperties2.Append(openXmlUnknownElement1); numberingSymbolRunProperties2.Append(openXmlUnknownElement2); level2.Append(startNumberingValue2); level2.Append(numberingFormat2); level2.Append(paragraphStyleIdInLevel2); level2.Append(levelText2); level2.Append(levelJustification2); level2.Append(previousParagraphProperties2); level2.Append(numberingSymbolRunProperties2); Level level3 = new Level() { LevelIndex = 2 }; StartNumberingValue startNumberingValue3 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat3 = new NumberingFormat() { Val = NumberFormatValues.LowerLetter }; ParagraphStyleIdInLevel paragraphStyleIdInLevel3 = new ParagraphStyleIdInLevel() { Val = "Heading3" }; LevelText levelText3 = new LevelText() { Val = "(%3)" }; LevelJustification levelJustification3 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties3 = new PreviousParagraphProperties(); Tabs tabs2 = new Tabs(); TabStop tabStop2 = new TabStop() { Val = TabStopValues.Number, Position = 1800 }; tabs2.Append(tabStop2); Indentation indentation3 = new Indentation() { Left = "1800", Hanging = "720" }; previousParagraphProperties3.Append(tabs2); previousParagraphProperties3.Append(indentation3); NumberingSymbolRunProperties numberingSymbolRunProperties3 = new NumberingSymbolRunProperties(); RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.Default }; numberingSymbolRunProperties3.Append(runFonts3); level3.Append(startNumberingValue3); level3.Append(numberingFormat3); level3.Append(paragraphStyleIdInLevel3); level3.Append(levelText3); level3.Append(levelJustification3); level3.Append(previousParagraphProperties3); level3.Append(numberingSymbolRunProperties3); Level level4 = new Level() { LevelIndex = 3 }; StartNumberingValue startNumberingValue4 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat4 = new NumberingFormat() { Val = NumberFormatValues.LowerRoman }; ParagraphStyleIdInLevel paragraphStyleIdInLevel4 = new ParagraphStyleIdInLevel() { Val = "Heading4" }; LevelText levelText4 = new LevelText() { Val = "(%4)" }; LevelJustification levelJustification4 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties4 = new PreviousParagraphProperties(); Tabs tabs3 = new Tabs(); TabStop tabStop3 = new TabStop() { Val = TabStopValues.Number, Position = 2160 }; tabs3.Append(tabStop3); Indentation indentation4 = new Indentation() { Left = "2160", Hanging = "720" }; previousParagraphProperties4.Append(tabs3); previousParagraphProperties4.Append(indentation4); NumberingSymbolRunProperties numberingSymbolRunProperties4 = new NumberingSymbolRunProperties(); RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.Default }; Bold bold2 = new Bold() { Val = false }; Italic italic2 = new Italic() { Val = false }; numberingSymbolRunProperties4.Append(runFonts4); numberingSymbolRunProperties4.Append(bold2); numberingSymbolRunProperties4.Append(italic2); level4.Append(startNumberingValue4); level4.Append(numberingFormat4); level4.Append(paragraphStyleIdInLevel4); level4.Append(levelText4); level4.Append(levelJustification4); level4.Append(previousParagraphProperties4); level4.Append(numberingSymbolRunProperties4); Level level5 = new Level() { LevelIndex = 4 }; StartNumberingValue startNumberingValue5 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat5 = new NumberingFormat() { Val = NumberFormatValues.LowerLetter }; ParagraphStyleIdInLevel paragraphStyleIdInLevel5 = new ParagraphStyleIdInLevel() { Val = "Heading5" }; LevelText levelText5 = new LevelText() { Val = "%5)" }; LevelJustification levelJustification5 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties5 = new PreviousParagraphProperties(); Tabs tabs4 = new Tabs(); TabStop tabStop4 = new TabStop() { Val = TabStopValues.Number, Position = 2880 }; tabs4.Append(tabStop4); Indentation indentation5 = new Indentation() { Left = "2880", Hanging = "720" }; previousParagraphProperties5.Append(tabs4); previousParagraphProperties5.Append(indentation5); NumberingSymbolRunProperties numberingSymbolRunProperties5 = new NumberingSymbolRunProperties(); RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.Default, Ascii = "Book Antiqua", HighAnsi = "Book Antiqua" }; Bold bold3 = new Bold() { Val = false }; Italic italic3 = new Italic() { Val = false }; FontSize fontSize1 = new FontSize() { Val = "22" }; numberingSymbolRunProperties5.Append(runFonts5); numberingSymbolRunProperties5.Append(bold3); numberingSymbolRunProperties5.Append(italic3); numberingSymbolRunProperties5.Append(fontSize1); level5.Append(startNumberingValue5); level5.Append(numberingFormat5); level5.Append(paragraphStyleIdInLevel5); level5.Append(levelText5); level5.Append(levelJustification5); level5.Append(previousParagraphProperties5); level5.Append(numberingSymbolRunProperties5); Level level6 = new Level() { LevelIndex = 5 }; StartNumberingValue startNumberingValue6 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat6 = new NumberingFormat() { Val = NumberFormatValues.LowerRoman }; ParagraphStyleIdInLevel paragraphStyleIdInLevel6 = new ParagraphStyleIdInLevel() { Val = "Heading6" }; LevelText levelText6 = new LevelText() { Val = "(%6)" }; LevelJustification levelJustification6 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties6 = new PreviousParagraphProperties(); Tabs tabs5 = new Tabs(); TabStop tabStop5 = new TabStop() { Val = TabStopValues.Number, Position = 1440 }; tabs5.Append(tabStop5); Indentation indentation6 = new Indentation() { Left = "1440", Hanging = "720" }; previousParagraphProperties6.Append(tabs5); previousParagraphProperties6.Append(indentation6); NumberingSymbolRunProperties numberingSymbolRunProperties6 = new NumberingSymbolRunProperties(); RunFonts runFonts6 = new RunFonts() { Hint = FontTypeHintValues.Default, Ascii = "Book Antiqua", HighAnsi = "Book Antiqua" }; Bold bold4 = new Bold() { Val = false }; Italic italic4 = new Italic() { Val = false }; FontSize fontSize2 = new FontSize() { Val = "22" }; numberingSymbolRunProperties6.Append(runFonts6); numberingSymbolRunProperties6.Append(bold4); numberingSymbolRunProperties6.Append(italic4); numberingSymbolRunProperties6.Append(fontSize2); level6.Append(startNumberingValue6); level6.Append(numberingFormat6); level6.Append(paragraphStyleIdInLevel6); level6.Append(levelText6); level6.Append(levelJustification6); level6.Append(previousParagraphProperties6); level6.Append(numberingSymbolRunProperties6); Level level7 = new Level() { LevelIndex = 6 }; StartNumberingValue startNumberingValue7 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat7 = new NumberingFormat() { Val = NumberFormatValues.Decimal }; LevelText levelText7 = new LevelText() { Val = "%1.%2.%3.%4.%5.%6.%7." }; LevelJustification levelJustification7 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties7 = new PreviousParagraphProperties(); Tabs tabs6 = new Tabs(); TabStop tabStop6 = new TabStop() { Val = TabStopValues.Number, Position = 5400 }; tabs6.Append(tabStop6); Indentation indentation7 = new Indentation() { Left = "3240", Hanging = "1080" }; previousParagraphProperties7.Append(tabs6); previousParagraphProperties7.Append(indentation7); NumberingSymbolRunProperties numberingSymbolRunProperties7 = new NumberingSymbolRunProperties(); RunFonts runFonts7 = new RunFonts() { Hint = FontTypeHintValues.Default }; numberingSymbolRunProperties7.Append(runFonts7); level7.Append(startNumberingValue7); level7.Append(numberingFormat7); level7.Append(levelText7); level7.Append(levelJustification7); level7.Append(previousParagraphProperties7); level7.Append(numberingSymbolRunProperties7); Level level8 = new Level() { LevelIndex = 7 }; StartNumberingValue startNumberingValue8 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat8 = new NumberingFormat() { Val = NumberFormatValues.Decimal }; LevelText levelText8 = new LevelText() { Val = "%1.%2.%3.%4.%5.%6.%7.%8." }; LevelJustification levelJustification8 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties8 = new PreviousParagraphProperties(); Tabs tabs7 = new Tabs(); TabStop tabStop7 = new TabStop() { Val = TabStopValues.Number, Position = 6120 }; tabs7.Append(tabStop7); Indentation indentation8 = new Indentation() { Left = "3744", Hanging = "1224" }; previousParagraphProperties8.Append(tabs7); previousParagraphProperties8.Append(indentation8); NumberingSymbolRunProperties numberingSymbolRunProperties8 = new NumberingSymbolRunProperties(); RunFonts runFonts8 = new RunFonts() { Hint = FontTypeHintValues.Default }; numberingSymbolRunProperties8.Append(runFonts8); level8.Append(startNumberingValue8); level8.Append(numberingFormat8); level8.Append(levelText8); level8.Append(levelJustification8); level8.Append(previousParagraphProperties8); level8.Append(numberingSymbolRunProperties8); Level level9 = new Level() { LevelIndex = 8 }; StartNumberingValue startNumberingValue9 = new StartNumberingValue() { Val = 1 }; NumberingFormat numberingFormat9 = new NumberingFormat() { Val = NumberFormatValues.Decimal }; LevelText levelText9 = new LevelText() { Val = "%1.%2.%3.%4.%5.%6.%7.%8.%9." }; LevelJustification levelJustification9 = new LevelJustification() { Val = LevelJustificationValues.Left }; PreviousParagraphProperties previousParagraphProperties9 = new PreviousParagraphProperties(); Tabs tabs8 = new Tabs(); TabStop tabStop8 = new TabStop() { Val = TabStopValues.Number, Position = 6840 }; tabs8.Append(tabStop8); Indentation indentation9 = new Indentation() { Left = "4320", Hanging = "1440" }; previousParagraphProperties9.Append(tabs8); previousParagraphProperties9.Append(indentation9); NumberingSymbolRunProperties numberingSymbolRunProperties9 = new NumberingSymbolRunProperties(); RunFonts runFonts9 = new RunFonts() { Hint = FontTypeHintValues.Default }; numberingSymbolRunProperties9.Append(runFonts9); level9.Append(startNumberingValue9); level9.Append(numberingFormat9); level9.Append(levelText9); level9.Append(levelJustification9); level9.Append(previousParagraphProperties9); level9.Append(numberingSymbolRunProperties9); abstractNum1.Append(nsid1); abstractNum1.Append(multiLevelType1); abstractNum1.Append(templateCode1); abstractNum1.Append(level1); abstractNum1.Append(level2); abstractNum1.Append(level3); abstractNum1.Append(level4); abstractNum1.Append(level5); abstractNum1.Append(level6); abstractNum1.Append(level7); abstractNum1.Append(level8); abstractNum1.Append(level9); NumberingInstance numberingInstance1 = new NumberingInstance() { NumberID = 1 }; AbstractNumId abstractNumId1 = new AbstractNumId() { Val = 0 }; LevelOverride levelOverride1 = new LevelOverride() { LevelIndex = 0 }; StartOverrideNumberingValue startOverrideNumberingValue1 = new StartOverrideNumberingValue() { Val = 2 }; levelOverride1.Append(startOverrideNumberingValue1); LevelOverride levelOverride2 = new LevelOverride() { LevelIndex = 1 }; StartOverrideNumberingValue startOverrideNumberingValue2 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride2.Append(startOverrideNumberingValue2); LevelOverride levelOverride3 = new LevelOverride() { LevelIndex = 2 }; StartOverrideNumberingValue startOverrideNumberingValue3 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride3.Append(startOverrideNumberingValue3); LevelOverride levelOverride4 = new LevelOverride() { LevelIndex = 3 }; StartOverrideNumberingValue startOverrideNumberingValue4 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride4.Append(startOverrideNumberingValue4); LevelOverride levelOverride5 = new LevelOverride() { LevelIndex = 4 }; StartOverrideNumberingValue startOverrideNumberingValue5 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride5.Append(startOverrideNumberingValue5); LevelOverride levelOverride6 = new LevelOverride() { LevelIndex = 5 }; StartOverrideNumberingValue startOverrideNumberingValue6 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride6.Append(startOverrideNumberingValue6); LevelOverride levelOverride7 = new LevelOverride() { LevelIndex = 6 }; StartOverrideNumberingValue startOverrideNumberingValue7 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride7.Append(startOverrideNumberingValue7); LevelOverride levelOverride8 = new LevelOverride() { LevelIndex = 7 }; StartOverrideNumberingValue startOverrideNumberingValue8 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride8.Append(startOverrideNumberingValue8); LevelOverride levelOverride9 = new LevelOverride() { LevelIndex = 8 }; StartOverrideNumberingValue startOverrideNumberingValue9 = new StartOverrideNumberingValue() { Val = 1 }; levelOverride9.Append(startOverrideNumberingValue9); numberingInstance1.Append(abstractNumId1); numberingInstance1.Append(levelOverride1); numberingInstance1.Append(levelOverride2); numberingInstance1.Append(levelOverride3); numberingInstance1.Append(levelOverride4); numberingInstance1.Append(levelOverride5); numberingInstance1.Append(levelOverride6); numberingInstance1.Append(levelOverride7); numberingInstance1.Append(levelOverride8); numberingInstance1.Append(levelOverride9); NumberingInstance numberingInstance2 = new NumberingInstance() { NumberID = 2 }; AbstractNumId abstractNumId2 = new AbstractNumId() { Val = 0 }; numberingInstance2.Append(abstractNumId2); numbering1.Append(abstractNum1); numbering1.Append(numberingInstance1); numbering1.Append(numberingInstance2); return(numbering1); }
public CustomToolStripTextBox(Layer drawingLayer, Emphasis textEmphasis) : base() { DrawingLayer = drawingLayer; TextEmphasis = textEmphasis; AutoSize = true; }
public void EndEmphasis(Emphasis e) { indent -= IndentBy; }
public virtual void Visit(Emphasis inline) { WriteStartTag(inline, "em"); Write(inline.Inlines); WriteEndTag(inline, "em"); }