Class NumberList
Tên không gian: Aspose.Note Tổng hợp: Aspose.Note.dll (25.4.0)
Nó đại diện cho danh sách số hoặc đạn.
public class NumberList
Inheritance
Thành viên thừa kế
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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>
Hiển thị làm thế nào để nhập danh sách mới với số hóa Trung Quốc.
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);
Hiển thị cách nhập danh sách mới với số.
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(string, string, int)
Bắt đầu một trường hợp mới của lớp Aspose.Note.NumberList.Ví dụ này đại diện cho một danh sách bắn súng.
public NumberList(string bulletedSymbol, string font, int fontSize)
Parameters
bulletedSymbol
string
Một biểu tượng đại diện cho một quả bóng.
font
string
Một chữ cái cho quả bóng.
fontSize
int
Một kích thước chữ cái cho quả bóng.
NumberList(string, NumberFormat, string , int)
Bắt đầu một trường hợp mới của lớp Aspose.Note.NumberList.Ví dụ này đại diện cho một danh sách số.
public NumberList(string format, NumberFormat numberFormat, string font, int fontSize)
Parameters
format
string
Định dạng của tiêu đề số.
numberFormat
NumberFormat
Định dạng của số trong header.
font
string
Một phông chữ cho tiêu đề số.
fontSize
int
Một kích thước phông chữ cho tiêu đề số.
Properties
Font
Nhận hoặc đặt tên của font.
public string Font { get; set; }
Giá trị bất động sản
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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
Nhận hoặc đặt màu font.
public Color FontColor { get; set; }
Giá trị bất động sản
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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
Nhận hoặc đặt kích thước phông chữ.
public int FontSize { get; set; }
Giá trị bất động sản
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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
Nhận hoặc đặt định dạng của tiêu đề dòng. Đối với danh sách bắn súng đại diện cho một biểu tượng đạn.
public string Format { get; set; }
Giá trị bất động sản
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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
Nhận hoặc đặt một giá trị cho thấy liệu phong cách văn bản có dũng cảm hay không.
public bool IsBold { get; set; }
Giá trị bất động sản
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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
Nhận hoặc đặt một giá trị cho thấy liệu phong cách văn bản là tiếng Ý hay không.
public bool IsItalic { get; set; }
Giá trị bất động sản
Examples
Hiển thị cách thu thập thông tin về định dạng danh sách.
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
Nhận hoặc đặt thời gian sửa đổi cuối cùng.
public DateTime LastModifiedTime { get; set; }
Giá trị bất động sản
NumberFormat
Nhận hoặc đặt định dạng số được sử dụng cho một nhóm các đối tượng được tính tự động.
public NumberFormat? NumberFormat { get; set; }
Giá trị bất động sản
Restart
Nhận hoặc đặt giá trị số vượt quá giá cả số tự động của mục danh sách.
public int Restart { get; set; }
Giá trị bất động sản
Methods
Equals(đối tượng)
Nó xác định xem đối tượng được chỉ định có bằng đối tượng hiện tại hay không.
public override bool Equals(object obj)
Parameters
obj
object
đối tượng .
Returns
Hệ thống - Boolean
Equals(NumberList)
Nó xác định xem đối tượng được chỉ định có bằng đối tượng hiện tại hay không.
public bool Equals(NumberList other)
Parameters
other
NumberList
đối tượng .
Returns
Hệ thống - Boolean
GetHashCode()
Nó phục vụ như một chức năng hash cho loại.
public override int GetHashCode()
Returns
Hệ thống.Int32.
GetNumberedListHeader(int)
Nhận số danh sách tiêu đề.
public string GetNumberedListHeader(int sequenceNumber)
Parameters
sequenceNumber
int
Số liên kết trong danh sách số.
Returns
Một biểu hiện sợi của số chuỗi cụ thể.