Class OutlineElement
Název místa: Aspose.Note Shromáždění: Aspose.Note.dll (25.4.0)
Představuje OutlineElement.
public sealed class OutlineElement : IndentatedNode<IOutlineElementChildNode>, ICompositeNode<IOutlineElementChildNode>, ICompositeNode,
IEnumerable<IOutlineElementChildNode>, IEnumerable, IIndentatedNode, IOutlineChildNode, IOutlineElementChildNode, INode
{
}
Inheritance
object
←
Node
←
CompositeNodeBase
←
CompositeNode
Implements
ICompositeNode
Dědiční členové
IndentatedNode
Examples
Ukazuje, jak přidat nový obrázek s tagem.
string dataDir = RunExamples.GetDataDir_Tags();
Document doc = new Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
OutlineElement outlineElem = new OutlineElement(doc);
Aspose.Note.Image image = new Aspose.Note.Image(doc, dataDir + "icon.jpg");
outlineElem.AppendChildLast(image);
image.Tags.Add(NoteTag.CreateYellowStar());
outline.AppendChildLast(outlineElem);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "AddImageNodeWithTag_out.one";
doc.Save(dataDir);
Ukazuje, jak získat informace o formátování seznamu.
string dataDir = RunExamples.GetDataDir_Text();
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
Console.WriteLine("Font Name: " + list.Font);
Console.WriteLine("Font Length: " + list.Font.Length);
Console.WriteLine("Font Size: " + list.FontSize);
Console.WriteLine("Font Color: " + list.FontColor);
Console.WriteLine("Font format: " + list.Format);
Console.WriteLine("Is bold: " + list.IsBold);
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}
Ukazuje, jak zadat nový seznam s čínským číslem.
string dataDir = RunExamples.GetDataDir_Text();
Aspose.Note.Document doc = new Aspose.Note.Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
ParagraphStyle defaultStyle = new ParagraphStyle
{
FontColor = Color.Black,
FontName = "Arial",
FontSize = 10
};
OutlineElement outlineElem1 = new OutlineElement(doc)
{
NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10)
};
RichText text1 = new RichText(doc)
{
Text = "First",
ParagraphStyle = defaultStyle
};
outlineElem1.AppendChildLast(text1);
OutlineElement outlineElem2 = new OutlineElement(doc)
{
NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10)
};
RichText text2 = new RichText(doc)
{
Text = "Second",
ParagraphStyle = defaultStyle
};
outlineElem2.AppendChildLast(text2);
OutlineElement outlineElem3 = new OutlineElement(doc)
{
NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10)
};
RichText text3 = new RichText(doc)
{
Text = "Third",
ParagraphStyle = defaultStyle
};
outlineElem3.AppendChildLast(text3);
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "InsertChineseNumberList_out.one";
doc.Save(dataDir);
Ukazuje, jak vložit nový bulleted lis.
string dataDir = RunExamples.GetDataDir_Text();
Aspose.Note.Document doc = new Aspose.Note.Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);
OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);
OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "ApplyBulletsOnText_out.one";
doc.Save(dataDir);
Ukazuje, jak zadat nový seznam s číslem.
string dataDir = RunExamples.GetDataDir_Text();
Document doc = new Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);
OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);
OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "ApplyNumberingOnText_out.one";
doc.Save(dataDir);
Constructors
Výstupní prvek ()
public OutlineElement()
{
}
Properties
AuthorMostRecent
Obdrží nejnovější autor outline prvku.
public string AuthorMostRecent
{
get;
}
Hodnota nemovitosti
AuthorOriginal
Získáte původního autora outline prvku.
public string AuthorOriginal
{
get;
}
Hodnota nemovitosti
CreationTime
Získáte nebo nastavíte čas stvoření.
public DateTime CreationTime
{
get;
set;
}
Hodnota nemovitosti
LastModifiedTime
Obdržíte nebo nastavíte poslední změněný čas.
public DateTime LastModifiedTime
{
get;
set;
}
Hodnota nemovitosti
NumberList
Získáte nebo nastavíte styl pro číslovaný titulek seznamu.
public NumberList NumberList
{
get { return this._numberList; }
set { this._numberList = value; }
}
private NumberList _numberList;
Hodnota nemovitosti
Examples
Ukazuje, jak získat informace o formátování seznamu.
string dataDir = RunExamples.GetDataDir_Text();
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
Console.WriteLine("Font Name: " + list.Font);
Console.WriteLine("Font Length: " + list.Font.Length);
Console.WriteLine("Font Size: " + list.FontSize);
Console.WriteLine("Font Color: " + list.FontColor);
Console.WriteLine("Font format: " + list.Format);
Console.WriteLine("Is bold: " + list.IsBold);
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}
Ukazuje, jak zadat nový seznam s čínským číslem.
string dataDir = RunExamples.GetDataDir_Text();
Aspose.Note.Document doc = new Aspose.Note.Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
ParagraphStyle defaultStyle = new ParagraphStyle
{
FontColor = Color.Black,
FontName = "Arial",
FontSize = 10
};
OutlineElement outlineElem1 = new OutlineElement(doc)
{
NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10)
};
RichText text1 = new RichText(doc)
{
Text = "First",
ParagraphStyle = defaultStyle
};
outlineElem1.AppendChildLast(text1);
OutlineElement outlineElem2 = new OutlineElement(doc)
{
NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10)
};
RichText text2 = new RichText(doc)
{
Text = "Second",
ParagraphStyle = defaultStyle
};
outlineElem2.AppendChildLast(text2);
OutlineElement outlineElem3 = new OutlineElement(doc)
{
NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10)
};
RichText text3 = new RichText(doc)
{
Text = "Third",
ParagraphStyle = defaultStyle
};
outlineElem3.AppendChildLast(text3);
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "InsertChineseNumberList_out.one";
doc.Save(dataDir);
Ukazuje, jak vložit nový bulleted lis.
string dataDir = RunExamples.GetDataDir_Text();
Aspose.Note.Document doc = new Aspose.Note.Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);
OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);
OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "ApplyBulletsOnText_out.one";
doc.Save(dataDir);
Ukazuje, jak zadat nový seznam s číslem.
string dataDir = RunExamples.GetDataDir_Text();
Document doc = new Document();
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);
OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);
OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);
dataDir = dataDir + "ApplyNumberingOnText_out.one";
doc.Save(dataDir);
Methods
Přijímání (DocumentVisitor)
Přijímá návštěvníka nodu.
public override void Accept(DocumentVisitor visitor)
{
visitor.Visit(this);
}
Parameters
visitor
DocumentVisitor
Předmět třídy je odvozen od Aspose.Note.DocumentVisitor.