Class NumberList

Class NumberList

nazivni prostor: Aspose.Note Sastav: Aspose.Note.dll (25.4.0)

Prikazuje brojani ili zabilježen popis.

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

naslijeđeni članovi

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

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Prikazuje kako unijeti novi popis s kineskim brojem.

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

Prikazuje kako unijeti novi popis s brojem.

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

Brojni list (string, string, int)

Inicijalizira novu primjenu Aspose.Note.NumberList razreda.Ovaj primjer predstavlja pucani popis.

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

Parameters

bulletedSymbol string

Simbol koji predstavlja loptu.

font string

Jedan znak za loptu.

fontSize int

Veličina pisma za loptu.

Brojna lista (string, NumberFormat, string, int)

Inicijalizira novu primjenu Aspose.Note.NumberList razreda.Ovaj primjer predstavlja brojni popis.

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

Parameters

format string

Obrazac brojenog naslova.

numberFormat NumberFormat

Format broja u naslovnici.

font string

Članak za brojani naslovnik.

fontSize int

Veličina pisma za brojne glave.

Properties

Font

Pronađite ili postavite ime font.

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

Vrijednost nekretnina

string

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Pronađite ili postavite boju fontova.

public Color FontColor
   {
      get;
      set;
   }

Vrijednost nekretnina

Color

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Pronađite ili postavite veličinu pisma.

public int FontSize
   {
      get;
      set;
   }

Vrijednost nekretnina

int

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Dobiva ili postavlja formatu naslovnice linije. za listove pucnjave predstavlja simbol puca.

public string Format
   {
      get;
      set;
   }

Vrijednost nekretnina

string

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Dobiva ili postavlja vrijednost koja ukazuje na to je li tekstni stil hrabri.

public bool IsBold
   {
      get;
      set;
   }

Vrijednost nekretnina

bool

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Dobiva ili postavlja vrijednost koja ukazuje na to je li stil teksta italijanski.

public bool IsItalic
   {
      get;
      set;
   }

Vrijednost nekretnina

bool

Examples

Pokaže kako dobiti informacije o formataciji popisa.

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

Pronađite ili postavite posljednje izmijenjene vrijeme.

public DateTime LastModifiedTime
   {
      get;
      set;
   }

Vrijednost nekretnina

DateTime

NumberFormat

Pronađite ili postavite format broja koji se koristi za skup automatski brojiranih predmeta.

public NumberFormat? NumberFormat
   {
      get;
      set;
   }

Vrijednost nekretnina

NumberFormat ?

Restart

Pronađe ili postavlja brojnu vrijednost koja prelazi automatsku brojku vrijednosti predmeta popisa.

public int Restart
   {
      get;
      set;
   }

Vrijednost nekretnina

int

Methods

Razlika između objekata (objekta)

Određuje je li određeni objekt jednak trenutnom predmetu.

public override bool Equals(object obj)
   {
   }

Parameters

obj object

To je predmet.

Returns

bool

To je sustav.Boolean.

Slijedeći članakEquals(NumberList)

Određuje je li određeni objekt jednak trenutnom predmetu.

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

To je predmet.

Returns

bool

To je sustav.Boolean.

Slijedeći članakHashCode()

Služi kao hash funkcija za tip.

public override int GetHashCode()
   {
   }

Returns

int

Slijedeći članakInt32.

Slijedeći članakGetNumberedListHeader(int)

Pronađite brojne naslovnice popisa.

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

Broj sekvencije na brojenom popisu.

Returns

string

Prikaz određenog sekvencijskog broja.

 Hrvatski