Class NumberList

Class NumberList

A név: Aspose.Note Összefoglaló: Aspose.Note.dll (25.4.0)

A számlázott vagy golyózott listát képviseli.

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 NumberList

Örökletes tagok

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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();
      }
   }

Megmutatja, hogyan kell beírni egy új listát kínai számítással.

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);

Megmutatja, hogyan kell beírni egy új listát a számítással.

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

számlist (string, string, int)

Kezdődik a Aspose.Note.NumberList osztály új példánya.Ez az eset egy lövöldözött listát képvisel.

public NumberList(string bulletedSymbol, string font, int fontSize)
   {
   }

Parameters

bulletedSymbol string

Szimbólum, amely egy golyót képvisel.

font string

Írás a golyóhoz.

fontSize int

Font mérete a golyóhoz.

Számjegyzék (string, NumberFormat, string, int)

Kezdődik a Aspose.Note.NumberList osztály új példánya.Ez az eset egy számjegyzett listát képvisel.

public NumberList(
       string format,
       NumberFormat numberFormat,
       string font,
       int fontSize
   )
   {
   }

Parameters

format string

A számlázott fejezet formátumát.

numberFormat NumberFormat

A szám formátumát a headerben.

font string

A számlázott fejezethez tartozó betű.

fontSize int

A font mérete a számolt címkével.

Properties

Font

Kap vagy adja meg a betűtípus nevét.

public string Font
   {
      get
      {
         return this._font;
      }
      set
      {
         this._font = value;
      }
   }

ingatlan értéke

string

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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

Megkapja vagy beállítja a font színét.

public Color FontColor
   {
      get;
      set;
   }

ingatlan értéke

Color

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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

Megkapja vagy beállítja a betűméretet.

public int FontSize
   {
      get;
      set;
   }

ingatlan értéke

int

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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

Megkapja vagy beállítja a formátumot a vonal fejjel. A golyó listák képviseli a golyós szimbólumot.

public string Format
   {
      get;
      set;
   }

ingatlan értéke

string

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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

Megkap egy értéket vagy beállítást, amely azt jelzi, hogy a szöveges stílus bátor.

public bool IsBold
   {
      get;
      set;
   }

ingatlan értéke

bool

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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

Megkap egy értéket vagy beállítást, amely azt jelzi, hogy a szöveges stílus olasz.

public bool IsItalic
   {
      get;
      set;
   }

ingatlan értéke

bool

Examples

Megmutatja, hogyan lehet információt szerezni a lista formázásáról.

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

Megkapja vagy beállítja az utolsó módosított időt.

public DateTime LastModifiedTime
   {
      get;
      set;
   }

ingatlan értéke

DateTime

NumberFormat

Megkapja vagy beállítja a számformátumot, amelyet automatikusan számolt objektumok egy csoportjára használnak.

public NumberFormat? NumberFormat
   {
      get;
      set;
   }

ingatlan értéke

NumberFormat ?

Restart

Megkapja vagy beállítja azt a számértéket, amely meghaladja a listaelem automatikus számértéket.

public int Restart
   {
      get;
      set;
   }

ingatlan értéke

int

Methods

Az egyenlő tárgy (object)

Meghatározza, hogy a meghatározott objektum egyenlő-e a jelenlegi objektummal.

public override bool Equals(object obj)
   {
   }

Parameters

obj object

Az objektum.

Returns

bool

A rendszer – Boolean.

Az egyenlők (NumberList)

Meghatározza, hogy a meghatározott objektum egyenlő-e a jelenlegi objektummal.

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

Az objektum.

Returns

bool

A rendszer – Boolean.

Székesfehérvár()

Has funkcióként szolgál a típus számára.

public override int GetHashCode()
   {
   }

Returns

int

A rendszer.Int32.

GetNumberedListHeader(int) megtekintése

Megkapja a számolt lista címét.

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

A szekvencia száma a számolt listában.

Returns

string

A szekvenciális szám meghatározott sorozatszámának ábrázolása.

 Magyar