Class NumberList
Името на пространството: Aspose.Note Асамблея: Aspose.Note.dll (25.4.0)
Представлява номериран или булетен списък.
public class NumberList
Inheritance
наследници
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
Показва как да въведете нов списък с китайско броене.
string dataDir = RunExamples.GetDataDir_Text();
// Initialize OneNote document
Aspose.Note.Document doc = new Aspose.Note.Document();
// Initialize OneNote page
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);
// Apply text style settings
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
// Numbers in the same outline are automatically incremented.
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);
// Save OneNote document
dataDir = dataDir + "InsertChineseNumberList_out.one";
doc.Save(dataDir);
Показва как да въведете нов списък с броене.
string dataDir = RunExamples.GetDataDir_Text();
// Create an object of the Document class
Document doc = new Document();
// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);
// Initialize Outline class object
Outline outline = new Outline(doc);
// Initialize TextStyle class object and set formatting properties
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
// Initialize OutlineElement class objects and apply numbering
// Numbers in the same outline are automatically incremented.
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);
// Add outline elements
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
// Add Outline node
page.AppendChildLast(outline);
// Add Page node
doc.AppendChildLast(page);
// Save OneNote document
dataDir = dataDir + "ApplyNumberingOnText_out.one";
doc.Save(dataDir);
Constructors
NumberList(Стринг, Стринг и Инт)
Иницијализира нова инстанция на класата Aspose.Note.NumberList.Този случай представлява булетен списък.
public NumberList(string bulletedSymbol, string font, int fontSize)
Parameters
bulletedSymbol
string
Символ, който представлява топка.
font
string
Една шрифт за топката.
fontSize
int
Размер на шрифта за топката.
NumberList(Стрийк, бройФормат, string, int)
Иницијализира нова инстанция на класата Aspose.Note.NumberList.Тази инстанция представлява номериран списък.
public NumberList(string format, NumberFormat numberFormat, string font, int fontSize)
Parameters
format
string
Форматът на номерирания заглавие.
numberFormat
NumberFormat
Форматът на броя в заглавието.
font
string
Една шрифт за номерирания заглавие.
fontSize
int
Размер на шрифта за номерирания заглавие.
Properties
Font
Получава или поставя името на шрифта.
public string Font { get; set; }
стойност на имота
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
FontColor
Получава или поставя цвета на шрифта.
public Color FontColor { get; set; }
стойност на имота
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
FontSize
Вземете или задайте размера на шрифта.
public int FontSize { get; set; }
стойност на имота
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
Format
Получава или задава формата на линията заглавието. за стрелба списъци представлява символ на стрелката.
public string Format { get; set; }
стойност на имота
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
IsBold
Получава или задава стойност, която показва дали стилът на текста е смел.
public bool IsBold { get; set; }
стойност на имота
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
IsItalic
Получава или задава стойност, която показва дали стилът на текста е италиански.
public bool IsItalic { get; set; }
стойност на имота
Examples
Показва как да се получи информация за форматирането на списъка.
string dataDir = RunExamples.GetDataDir_Text();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "ApplyNumberingOnText.one");
// Retrieve a collection nodes of the outline element
IList<outlineelement> nodes = oneFile.GetChildNodes<outlineelement>();
// Iterate through each node
foreach (OutlineElement node in nodes)
{
if (node.NumberList != null)
{
NumberList list = node.NumberList;
// Retrieve font name
Console.WriteLine("Font Name: " + list.Font);
// Retrieve font length
Console.WriteLine("Font Length: " + list.Font.Length);
// Retrieve font size
Console.WriteLine("Font Size: " + list.FontSize);
// Retrieve font color
Console.WriteLine("Font Color: " + list.FontColor);
// Retrieve format
Console.WriteLine("Font format: " + list.Format);
// Check bold
Console.WriteLine("Is bold: " + list.IsBold);
// Check italic
Console.WriteLine("Is italic: " + list.IsItalic);
Console.WriteLine();
}
}</outlineelement></outlineelement>
LastModifiedTime
Получава или задава последното модифицирано време.
public DateTime LastModifiedTime { get; set; }
стойност на имота
NumberFormat
Получава или задава формата на числото, използвана за група от автоматично номерирани обекти.
public NumberFormat? NumberFormat { get; set; }
стойност на имота
Restart
Получава или задава цифровата стойност, която надвишава автоматичната цифрови стойности на елемента от списъка.
public int Restart { get; set; }
стойност на имота
Methods
Equals(Обект)
Определя дали посоченият обект е равен на текущия.
public override bool Equals(object obj)
Parameters
obj
object
на обекта .
Returns
Системата е боолеан.
Equals(NumberList)
Определя дали посоченият обект е равен на текущия.
public bool Equals(NumberList other)
Parameters
other
NumberList
на обекта .
Returns
Системата е боолеан.
GetHashCode()
Той служи като функция за хаш за типа.
public override int GetHashCode()
Returns
Системът е инт32.
GetNumberedListHeader(инт)
Вземете номерния списък заглавието.
public string GetNumberedListHeader(int sequenceNumber)
Parameters
sequenceNumber
int
Номерът на последователността в номерирания списък.
Returns
Стрийно представяне на посоченото последователно число.