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
{
private List<int> _numbers;
public NumberList()
{
_numbers = new List<int>();
}
public void Add(int number)
{
_numbers.Add(number);
}
public int GetSum()
{
return _numbers.Sum();
}
}
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();
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();
}
}
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();
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);
Hiển thị cách nhập danh sách mới với số.
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
Danh sách số (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
{
return this._font;
}
set
{
this._font = value;
}
}
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();
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();
}
}
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();
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();
}
}
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();
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();
}
}
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();
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();
}
}
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();
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();
}
}
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();
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();
}
}
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
Các đối tượng (object)
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
Danh sách số (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)
{
if (other == null)
return false;
var thisLength = this._list.Count;
var otherLength = other._list.Count;
if (thisLength != otherLength)
return false;
for (int i = 0; i < thisLength; i++)
{
if (!this._list[i].Equals(other._list[i]))
return false;
}
return true;
}
Parameters
other
NumberList
đối tượng .
Returns
Hệ thống - Boolean
Tải về 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.
Lời bài hát: GetNumberedListHeader(int)
Nhận số danh sách tiêu đề.
public string GetNumberedListHeader(int sequenceNumber)
{
}
In this case, since the input code is already formatted according to standard C# conventions, no changes are needed. However, if there were any indentation issues or missing spacing in the code, I would format it accordingly, while strictly adhering to the guidelines mentioned above.
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ể.