本文整理汇总了C#中Level.Append方法的典型用法代码示例。如果您正苦于以下问题:C# Level.Append方法的具体用法?C# Level.Append怎么用?C# Level.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Level
的用法示例。
在下文中一共展示了Level.Append方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitNumberDefinitions
private void InitNumberDefinitions(NumberFormatValues numberFormat)
{
if (!context.HasNumberingDefinition(numberFormat))
{
//Enum values starting from zero. We need non zero values here
Int32 numberId = ((Int32)numberFormat) + 1;
AbstractNum abstractNum = new AbstractNum() { AbstractNumberId = numberId };
Level level = new Level() { LevelIndex = 0 };
StartNumberingValue startNumberingValue = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat = new NumberingFormat() { Val = numberFormat };
LevelText levelText = new LevelText() { Val = "%1." };
LevelJustification levelJustification = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties = new PreviousParagraphProperties();
Indentation indentation = new Indentation()
{
Start = "720",
Hanging = "360"
};
previousParagraphProperties.Append(indentation);
level.Append(startNumberingValue);
level.Append(numberingFormat);
level.Append(levelText);
level.Append(levelJustification);
level.Append(previousParagraphProperties);
abstractNum.Append(level);
NumberingInstance numberingInstance = new NumberingInstance() { NumberID = numberId };
AbstractNumId abstractNumId = new AbstractNumId() { Val = numberId };
numberingInstance.Append(abstractNumId);
context.SaveNumberingDefinition(numberFormat, abstractNum, numberingInstance);
}
}
示例2: GenerateListNumbering
/// <summary>
/// генарция настроек для списков
/// </summary>
public void GenerateListNumbering(ref Numbering numbering)
{
#region AbstractNum
AbstractNum abstractNum1 = new AbstractNum() { AbstractNumberId = 0 };
Nsid nsid1 = new Nsid() { Val = "2EB766E6" };
MultiLevelType multiLevelType1 = new MultiLevelType() { Val = MultiLevelValues.HybridMultilevel };
TemplateCode templateCode1 = new TemplateCode() { Val = "C1F20472" };
Level level1 = new Level() { LevelIndex = 0, TemplateCode = "04190001" };
StartNumberingValue startNumberingValue1 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat1 = new NumberingFormat() { Val = NumberFormatValues.Bullet };
LevelText levelText1 = new LevelText() { Val = "·" };
LevelJustification levelJustification1 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties1 = new PreviousParagraphProperties();
Indentation indentation1 = new Indentation() { Left = "1429", Hanging = "360" };
previousParagraphProperties1.Append(indentation1);
NumberingSymbolRunProperties numberingSymbolRunProperties1 = new NumberingSymbolRunProperties();
RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.Default, Ascii = "Symbol", HighAnsi = "Symbol" };
numberingSymbolRunProperties1.Append(runFonts1);
level1.Append(startNumberingValue1);
level1.Append(numberingFormat1);
level1.Append(levelText1);
level1.Append(levelJustification1);
level1.Append(previousParagraphProperties1);
level1.Append(numberingSymbolRunProperties1);
abstractNum1.Append(nsid1);
abstractNum1.Append(multiLevelType1);
abstractNum1.Append(templateCode1);
abstractNum1.Append(level1);
#endregion
NumberingInstance numberingInstance1 = new NumberingInstance() { NumberID = 1 };
AbstractNumId abstractNumId1 = new AbstractNumId() { Val = 0 };
numberingInstance1.Append(abstractNumId1);
numbering.Append(abstractNum1);
numbering.Append(numberingInstance1);
}
示例3: GenerateNumberingDefinitionsPart1Content
// Generates content of numberingDefinitionsPart1.
private void GenerateNumberingDefinitionsPart1Content(NumberingDefinitionsPart numberingDefinitionsPart1)
{
Numbering numbering1 = new Numbering() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se 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("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
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("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 = "10C33A66" };
MultiLevelType multiLevelType1 = new MultiLevelType() { Val = MultiLevelValues.HybridMultilevel };
TemplateCode templateCode1 = new TemplateCode() { Val = "3FEA53E8" };
Level level1 = new Level() { LevelIndex = 0, TemplateCode = "04090001" };
StartNumberingValue startNumberingValue1 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat1 = new NumberingFormat() { Val = NumberFormatValues.Bullet };
LevelText levelText1 = new LevelText() { Val = "·" };
LevelJustification levelJustification1 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties1 = new PreviousParagraphProperties();
Tabs tabs12 = new Tabs();
TabStop tabStop14 = new TabStop() { Val = TabStopValues.Number, Position = 1080 };
tabs12.Append(tabStop14);
Indentation indentation29 = new Indentation() { Start = "1080", Hanging = "360" };
previousParagraphProperties1.Append(tabs12);
previousParagraphProperties1.Append(indentation29);
NumberingSymbolRunProperties numberingSymbolRunProperties1 = new NumberingSymbolRunProperties();
RunFonts runFonts1070 = new RunFonts() { Hint = FontTypeHintValues.Default, Ascii = "Symbol", HighAnsi = "Symbol" };
numberingSymbolRunProperties1.Append(runFonts1070);
level1.Append(startNumberingValue1);
level1.Append(numberingFormat1);
level1.Append(levelText1);
level1.Append(levelJustification1);
level1.Append(previousParagraphProperties1);
level1.Append(numberingSymbolRunProperties1);
Level level2 = new Level() { LevelIndex = 1, TemplateCode = "04090003", Tentative = true };
StartNumberingValue startNumberingValue2 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat2 = new NumberingFormat() { Val = NumberFormatValues.Bullet };
LevelText levelText2 = new LevelText() { Val = "o" };
LevelJustification levelJustification2 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties2 = new PreviousParagraphProperties();
Tabs tabs13 = new Tabs();
TabStop tabStop15 = new TabStop() { Val = TabStopValues.Number, Position = 1800 };
tabs13.Append(tabStop15);
Indentation indentation30 = new Indentation() { Start = "1800", Hanging = "360" };
previousParagraphProperties2.Append(tabs13);
previousParagraphProperties2.Append(indentation30);
NumberingSymbolRunProperties numberingSymbolRunProperties2 = new NumberingSymbolRunProperties();
RunFonts runFonts1071 = new RunFonts() { Hint = FontTypeHintValues.Default, Ascii = "Courier New", HighAnsi = "Courier New" };
numberingSymbolRunProperties2.Append(runFonts1071);
level2.Append(startNumberingValue2);
level2.Append(numberingFormat2);
level2.Append(levelText2);
level2.Append(levelJustification2);
level2.Append(previousParagraphProperties2);
level2.Append(numberingSymbolRunProperties2);
Level level3 = new Level() { LevelIndex = 2, TemplateCode = "04090005", Tentative = true };
StartNumberingValue startNumberingValue3 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat3 = new NumberingFormat() { Val = NumberFormatValues.Bullet };
LevelText levelText3 = new LevelText() { Val = "§" };
LevelJustification levelJustification3 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties3 = new PreviousParagraphProperties();
Tabs tabs14 = new Tabs();
TabStop tabStop16 = new TabStop() { Val = TabStopValues.Number, Position = 2520 };
//.........这里部分代码省略.........
示例4: GenerateNumberingDefinitionsPart1Content
// Generates content of numberingDefinitionsPart1.
private void GenerateNumberingDefinitionsPart1Content(NumberingDefinitionsPart numberingDefinitionsPart1)
{
Numbering numbering1 = new Numbering();
AbstractNum abstractNum1 = new AbstractNum() { AbstractNumberId = 0 };
Nsid nsid1 = new Nsid() { Val = "2BE110B5" };
MultiLevelType multiLevelType1 = new MultiLevelType() { Val = MultiLevelValues.Multilevel };
TemplateCode templateCode1 = new TemplateCode() { Val = "263EA1D2" };
Level level1 = new Level() { LevelIndex = 0 };
StartNumberingValue startNumberingValue1 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat1 = new NumberingFormat() { Val = NumberFormatValues.Decimal };
ParagraphStyleIdInLevel paragraphStyleIdInLevel1 = new ParagraphStyleIdInLevel() { Val = "NumberedList" };
LevelText levelText1 = new LevelText() { Val = "%1." };
LevelJustification levelJustification1 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties1 = new PreviousParagraphProperties();
Tabs tabs1 = new Tabs();
TabStop tabStop1 = new TabStop() { Val = TabStopValues.Number, Position = 720 };
tabs1.Append(tabStop1);
Indentation indentation1 = new Indentation() { Left = "720", Hanging = "360" };
previousParagraphProperties1.Append(tabs1);
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(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 };
LevelText levelText2 = new LevelText() { Val = "%1.%2." };
LevelJustification levelJustification2 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties2 = new PreviousParagraphProperties();
Tabs tabs2 = new Tabs();
TabStop tabStop2 = new TabStop() { Val = TabStopValues.Number, Position = 792 };
tabs2.Append(tabStop2);
Indentation indentation2 = new Indentation() { Left = "792", Hanging = "432" };
previousParagraphProperties2.Append(tabs2);
previousParagraphProperties2.Append(indentation2);
NumberingSymbolRunProperties numberingSymbolRunProperties2 = new NumberingSymbolRunProperties();
RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.Default };
numberingSymbolRunProperties2.Append(runFonts2);
level2.Append(startNumberingValue2);
level2.Append(numberingFormat2);
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.Decimal };
LevelText levelText3 = new LevelText() { Val = "%1.%2.%3." };
LevelJustification levelJustification3 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties3 = new PreviousParagraphProperties();
Tabs tabs3 = new Tabs();
TabStop tabStop3 = new TabStop() { Val = TabStopValues.Number, Position = 1224 };
tabs3.Append(tabStop3);
Indentation indentation3 = new Indentation() { Left = "1224", Hanging = "504" };
previousParagraphProperties3.Append(tabs3);
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(levelText3);
level3.Append(levelJustification3);
level3.Append(previousParagraphProperties3);
level3.Append(numberingSymbolRunProperties3);
Level level4 = new Level() { LevelIndex = 3 };
//.........这里部分代码省略.........
示例5: GetNumbering
public void GetNumbering(ref Numbering numbering, int abstractNumId, int numberingInstanceId )
{
AbstractNum abstractNum1 = new AbstractNum() { AbstractNumberId = abstractNumId };
Nsid nsid1 = new Nsid() { Val = "3C7E7798" };
MultiLevelType multiLevelType1 = new MultiLevelType() { Val = MultiLevelValues.HybridMultilevel };
TemplateCode templateCode1 = new TemplateCode() { Val = "46C6786C" };
Level level1 = new Level() { LevelIndex = 0, TemplateCode = "38EAF7A0" };
StartNumberingValue startNumberingValue1 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat1 = new NumberingFormat() { Val = NumberFormatValues.Decimal };
LevelText levelText1 = new LevelText() { Val = "%1." };
LevelJustification levelJustification1 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties1 = new PreviousParagraphProperties();
Indentation indentation1 = new Indentation() { Left = "786", Hanging = "360" };
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(levelText1);
level1.Append(levelJustification1);
level1.Append(previousParagraphProperties1);
level1.Append(numberingSymbolRunProperties1);
Level level2 = new Level() { LevelIndex = 1, TemplateCode = "04190019", Tentative = true };
StartNumberingValue startNumberingValue2 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat2 = new NumberingFormat() { Val = NumberFormatValues.LowerLetter };
LevelText levelText2 = new LevelText() { Val = "%2." };
LevelJustification levelJustification2 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties2 = new PreviousParagraphProperties();
Indentation indentation2 = new Indentation() { Left = "1647", Hanging = "360" };
previousParagraphProperties2.Append(indentation2);
level2.Append(startNumberingValue2);
level2.Append(numberingFormat2);
level2.Append(levelText2);
level2.Append(levelJustification2);
level2.Append(previousParagraphProperties2);
Level level3 = new Level() { LevelIndex = 2, TemplateCode = "0419001B", Tentative = true };
StartNumberingValue startNumberingValue3 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat3 = new NumberingFormat() { Val = NumberFormatValues.LowerRoman };
LevelText levelText3 = new LevelText() { Val = "%3." };
LevelJustification levelJustification3 = new LevelJustification() { Val = LevelJustificationValues.Right };
PreviousParagraphProperties previousParagraphProperties3 = new PreviousParagraphProperties();
Indentation indentation3 = new Indentation() { Left = "2367", Hanging = "180" };
previousParagraphProperties3.Append(indentation3);
level3.Append(startNumberingValue3);
level3.Append(numberingFormat3);
level3.Append(levelText3);
level3.Append(levelJustification3);
level3.Append(previousParagraphProperties3);
Level level4 = new Level() { LevelIndex = 3, TemplateCode = "0419000F", Tentative = true };
StartNumberingValue startNumberingValue4 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat4 = new NumberingFormat() { Val = NumberFormatValues.Decimal };
LevelText levelText4 = new LevelText() { Val = "%4." };
LevelJustification levelJustification4 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties4 = new PreviousParagraphProperties();
Indentation indentation4 = new Indentation() { Left = "3087", Hanging = "360" };
previousParagraphProperties4.Append(indentation4);
level4.Append(startNumberingValue4);
level4.Append(numberingFormat4);
level4.Append(levelText4);
level4.Append(levelJustification4);
level4.Append(previousParagraphProperties4);
Level level5 = new Level() { LevelIndex = 4, TemplateCode = "04190019", Tentative = true };
StartNumberingValue startNumberingValue5 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat5 = new NumberingFormat() { Val = NumberFormatValues.LowerLetter };
LevelText levelText5 = new LevelText() { Val = "%5." };
LevelJustification levelJustification5 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties5 = new PreviousParagraphProperties();
Indentation indentation5 = new Indentation() { Left = "3807", Hanging = "360" };
previousParagraphProperties5.Append(indentation5);
level5.Append(startNumberingValue5);
level5.Append(numberingFormat5);
level5.Append(levelText5);
level5.Append(levelJustification5);
level5.Append(previousParagraphProperties5);
Level level6 = new Level() { LevelIndex = 5, TemplateCode = "0419001B", Tentative = true };
StartNumberingValue startNumberingValue6 = new StartNumberingValue() { Val = 1 };
//.........这里部分代码省略.........
示例6: GenerateAbstractNum
private static AbstractNum GenerateAbstractNum(int id, bool ordered, String symbol)
{
AbstractNum abstractNum1 = new AbstractNum() { AbstractNumberId = id };
Nsid nsid1 = new Nsid() { Val = "1FAB1E90" };
MultiLevelType multiLevelType1 = new MultiLevelType() { Val = MultiLevelValues.SingleLevel };
TemplateCode templateCode1 = new TemplateCode() { Val = "5BB0F638" };
Level level1 = new Level() { LevelIndex = 0, TemplateCode = "04090001" };
StartNumberingValue startNumberingValue1 = new StartNumberingValue() { Val = 1 };
NumberingFormat numberingFormat1 = new NumberingFormat();
LevelText levelText1 = new LevelText();
if (ordered) {
numberingFormat1.Val = NumberFormatValues.Decimal;
if (symbol == null) symbol = ".";
levelText1.Val = "%1" + symbol;
}else {
numberingFormat1.Val = NumberFormatValues.Bullet;
if (symbol == null) symbol = "-";
levelText1.Val = symbol;
}
LevelJustification levelJustification1 = new LevelJustification() { Val = LevelJustificationValues.Left };
PreviousParagraphProperties previousParagraphProperties1 = new PreviousParagraphProperties();
Indentation indentation1 = new Indentation() { Left = "720", Hanging = "360" };
previousParagraphProperties1.Append(indentation1);
NumberingSymbolRunProperties numberingSymbolRunProperties1 = new NumberingSymbolRunProperties();
//RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.Default, Ascii = "Symbol", HighAnsi = "Symbol" };
//numberingSymbolRunProperties1.Append(runFonts1);
level1.Append(startNumberingValue1);
level1.Append(numberingFormat1);
level1.Append(levelText1);
level1.Append(levelJustification1);
level1.Append(previousParagraphProperties1);
level1.Append(numberingSymbolRunProperties1);
abstractNum1.Append(nsid1);
abstractNum1.Append(multiLevelType1);
abstractNum1.Append(templateCode1);
abstractNum1.Append(level1);
return abstractNum1;
}