Class OutlineElement
Numele spaţiului: Aspose.Note Asamblare: Aspose.Note.dll (25.4.0)
Reprezintă un element extern.
public sealed class OutlineElement : IndentatedNode<IOutlineElementChildNode>, ICompositeNode<IOutlineElementChildNode>, ICompositeNode,
IEnumerable<IOutlineElementChildNode>, IEnumerable, IIndentatedNode, IOutlineChildNode, IOutlineElementChildNode, INode
{
}
Inheritance
object
←
Node
←
CompositeNodeBase
←
CompositeNode
Implements
ICompositeNode
Membrii moștenitori
IndentatedNode
Examples
arată cum să adăugați o nouă imagine cu eticheta.
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);
Afișează cum să obțineți informații despre formatarea listei.
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();
}
}
arată cum să introduceți o nouă listă cu numărarea chineză.
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);
Afișează cum să introduceți un nou lis bulleted.
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);
arată cum să introduceți o nouă listă cu numărare.
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
Cuvânt cheie()
public OutlineElement()
{
}
Properties
AuthorMostRecent
Obține cel mai recent autor al unui element de outline.
public string AuthorMostRecent
{
get;
}
Valoarea proprietății
AuthorOriginal
Obține autorul original al unui element de ieșire.
public string AuthorOriginal
{
get;
}
Valoarea proprietății
CreationTime
Obține sau stabilește timpul de creație.
public DateTime CreationTime
{
get;
set;
}
Valoarea proprietății
LastModifiedTime
Obține sau stabilește ultimul timp modificat.
public DateTime LastModifiedTime
{
get;
set;
}
Valoarea proprietății
NumberList
Obține sau stabilește stilul pentru titlul listelor numerate.
public NumberList NumberList
{
get { return this._numberList; }
set { this._numberList = value; }
}
private NumberList _numberList;
Valoarea proprietății
Examples
Afișează cum să obțineți informații despre formatarea listei.
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();
}
}
arată cum să introduceți o nouă listă cu numărarea chineză.
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);
Afișează cum să introduceți un nou lis bulleted.
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);
arată cum să introduceți o nouă listă cu numărare.
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
Acceptare (DocumentVisitor)
Acceptă vizitatorul nodului.
public override void Accept(DocumentVisitor visitor)
{
visitor.Visit(this);
}
Parameters
visitor
DocumentVisitor
Obiectul unei clase derivată din Aspose.Note.DocumentVisitor.