Class NumberList
名称: Aspose.Note 合計: Aspose.Note.dll (25.4.0)
ナンバーまたはボリュームリストを表します。
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
相続人
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();
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();
}
}
新しいリストを中国語で数える方法を示します。
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);
新しいリストを入力する方法を数字化で示します。
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
ナンバーリスト(string, string, int)
Aspose.Note.NumberList クラスの新しいインスタンスを開始します。この例は弾丸リストを表しています。
public NumberList(string bulletedSymbol, string font, int fontSize)
{
}
Parameters
bulletedSymbol
string
弾丸を表すシンボル。
font
string
弾丸のための文字。
fontSize
int
弾丸のための文字サイズ。
ナンバーリスト(string, NumberFormat, 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
{
return this._font;
}
set
{
this._font = value;
}
}
不動産価値
Examples
リストのフォーマットに関する情報を取得する方法を示します。
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
文字の色を得たり設定したりします。
public Color FontColor
{
get;
set;
}
不動産価値
Examples
リストのフォーマットに関する情報を取得する方法を示します。
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
フォントサイズを取得または設定します。
public int FontSize
{
get;
set;
}
不動産価値
Examples
リストのフォーマットに関する情報を取得する方法を示します。
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
受信またはラインヘッダーのフォーマットを設定します. 弾丸リストの場合、ボールシンボルを表します。
public string Format
{
get;
set;
}
不動産価値
Examples
リストのフォーマットに関する情報を取得する方法を示します。
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
テキストスタイルが勇気あるかどうかを示す値を取得または設定します。
public bool IsBold
{
get;
set;
}
不動産価値
Examples
リストのフォーマットに関する情報を取得する方法を示します。
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
テキストスタイルがイタリア語であるかどうかを示す値を取得または設定します。
public bool IsItalic
{
get;
set;
}
不動産価値
Examples
リストのフォーマットに関する情報を取得する方法を示します。
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
最後に変更された時間を取得または設定します。
public DateTime LastModifiedTime
{
get;
set;
}
不動産価値
NumberFormat
自動的に数値化されたオブジェクトのグループに使用される番号形式を取得または設定します。
public NumberFormat? NumberFormat
{
get;
set;
}
不動産価値
Restart
リスト項目の自動番号値を超える数値値を得たり設定したりします。
public int Restart
{
get;
set;
}
不動産価値
Methods
オブジェクト(Object)
指定されたオブジェクトが現在のオブジェクトに等しいかどうかを決定する。
public override bool Equals(object obj)
{
}
Parameters
obj
object
オブジェクト
Returns
システム・ボーレーン
ナンバーリスト(Numberlist)
指定されたオブジェクトが現在のオブジェクトに等しいかどうかを決定する。
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
オブジェクト
Returns
システム・ボーレーン
ハッシュコード( )
タイプのハッシュ機能として機能します。
public override int GetHashCode()
{
}
Returns
システム・インテル32
GetNumberedListHeader(インット)
数えられたリストヘッダーを取得します。
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
数値リストの順番番号です。
Returns
指定された順序番号の列表を表します。