Comment / CommentAuthor — Aspose.Slides FOSS for .NET API Reference

Diese Klassen verwalten Folien‑bezogene Kommentare und deren Autoren. Auf die Kommentarautoren kann zugegriffen werden über Presentation.CommentAuthors und pro‑Folie‑Kommentare über Slide.GetSlideComments().

Enumerations: Aspose.Slides.Foss (net9.0)

using Aspose.Slides.Foss;

Enumerations

public class Comment : IComment

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
TextstringEnumerationsKommentartext.
CreatedTimeDateTime?EnumerationsErstellungszeitpunkt des Kommentars.
SlideISlideEnumerationsFolie, zu der der Kommentar gehört.
AuthorICommentAuthorEnumerationsAutor des Kommentars.
PositionPointFEnumerationsPosition auf der Folie.
ParentCommentIComment?EnumerationsÜbergeordneter Kommentar für verschachtelte Antworten.

Enumerations

EnumerationsEnumerations
Remove()Diesen Kommentar entfernen.

CommentAuthor

public class CommentAuthor : ICommentAuthor

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
NamestringEnumerationsAnzeigename des Autors.
InitialsstringEnumerationsAutorinitialen.
CommentsICommentCollectionEnumerationsAlle Kommentare dieses Autors.

Enumerations

EnumerationsEnumerations
Remove()Diesen Autor und seine Kommentare entfernen.

CommentAuthorCollection

Zugriff über Presentation.CommentAuthors.

public class CommentAuthorCollection : ICommentAuthorCollection

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
CountintEnumerationsAnzahl der Autoren.

Enumerations

EnumerationsEnumerationsEnumerations
AddAuthor(string name, string initials)ICommentAuthorEinen neuen Kommentarautor hinzufügen.
FindByName(string name)ICommentAuthor[]Autoren nach Namen suchen.
FindByNameAndInitials(string name, string initials)ICommentAuthor[]Nach Namen und Initialen suchen.
RemoveAt(int index)voidDen Autor am angegebenen Index entfernen.
Remove(ICommentAuthor author)voidEinen bestimmten Autor entfernen.
Clear()voidAlle Autoren entfernen.
ToArray()ICommentAuthor[]Gib alle Autoren als Array zurück.

CommentCollection

Zugriff über CommentAuthor.Comments.

public class CommentCollection : ICommentCollection

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
CountintEnumerationsAnzahl der Kommentare.

Enumerations

EnumerationsEnumerationsEnumerations
AddComment(string text, ISlide slide, PointF position, DateTime creationTime)ICommentFüge einen Kommentar zu einer Folie hinzu.
InsertComment(int index, string text, ISlide slide, PointF position, DateTime creationTime)ICommentFüge einen Kommentar an einem bestimmten Index ein.
FindCommentByIdx(int idx)ICommentFinde einen Kommentar nach Index.
RemoveAt(int index)voidEntferne Kommentar am Index.
Remove(IComment comment)voidEntferne einen bestimmten Kommentar.
Clear()voidEntferne alle Kommentare.
ToArray()IComment[]Gib alle Kommentare als Array zurück.

Anwendungsbeispiele

Kommentar hinzufügen

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var author = prs.CommentAuthors.AddAuthor("Reviewer", "R");
author.Comments.AddComment(
    "Looks good!",
    prs.Slides[0],
    new PointF(100, 100),
    DateTime.Now);

prs.Save("commented.pptx", SaveFormat.Pptx);

Kommentare lesen

using Aspose.Slides.Foss;

using var prs = new Presentation("commented.pptx");
foreach (var author in prs.CommentAuthors)
{
    Console.WriteLine($"Author: {author.Name} ({author.Initials})");
    foreach (var comment in author.Comments)
    {
        Console.WriteLine($"  [{comment.Slide.SlideNumber}] {comment.Text}");
    }
}

Siehe auch

 Deutsch