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

Disse klasser håndterer kommentarer på slide‑niveau og deres forfattere. Få adgang til kommentarforfattere via Presentation.CommentAuthors og per‑slide kommentarer via Slide.GetSlideComments().

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

using Aspose.Slides.Foss;

Enumerations

public class Comment : IComment

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
TextstringEnumerationsKommentartekst.
CreatedTimeDateTime?EnumerationsHvornår kommentaren blev oprettet.
SlideISlideEnumerationsSlide som kommentaren tilhører.
AuthorICommentAuthorEnumerationsForfatter af kommentaren.
PositionPointFEnumerationsPosition på sliden.
ParentCommentIComment?EnumerationsOverordnet kommentar for trådet svar.

Enumerations

EnumerationsEnumerations
Remove()Fjern denne kommentar.

CommentAuthor

public class CommentAuthor : ICommentAuthor

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
NamestringEnumerationsForfatters visningsnavn.
InitialsstringEnumerationsForfatters initialer.
CommentsICommentCollectionEnumerationsAlle kommentarer fra denne forfatter.

Enumerations

EnumerationsEnumerations
Remove()Fjern denne forfatter og deres kommentarer.

CommentAuthorCollection

Tilgået via Presentation.CommentAuthors.

public class CommentAuthorCollection : ICommentAuthorCollection

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
CountintEnumerationsAntal forfattere.

Enumerations

EnumerationsEnumerationsEnumerations
AddAuthor(string name, string initials)ICommentAuthorTilføj en ny kommentarforfatter.
FindByName(string name)ICommentAuthor[]Find forfattere efter navn.
FindByNameAndInitials(string name, string initials)ICommentAuthor[]Find efter navn og initialer.
RemoveAt(int index)voidFjern forfatteren på det angivne indeks.
Remove(ICommentAuthor author)voidFjern en specifik forfatter.
Clear()voidFjern alle forfattere.
ToArray()ICommentAuthor[]Returner alle forfattere som et array.

CommentCollection

Tilgået via CommentAuthor.Comments.

public class CommentCollection : ICommentCollection

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
CountintEnumerationsAntal kommentarer.

Enumerations

EnumerationsEnumerationsEnumerations
AddComment(string text, ISlide slide, PointF position, DateTime creationTime)ICommentTilføj en kommentar til et slide.
InsertComment(int index, string text, ISlide slide, PointF position, DateTime creationTime)ICommentIndsæt en kommentar på et specifikt indeks.
FindCommentByIdx(int idx)ICommentFind en kommentar efter indeks.
RemoveAt(int index)voidFjern kommentar ved indeks.
Remove(IComment comment)voidFjern en specifik kommentar.
Clear()voidFjern alle kommentarer.
ToArray()IComment[]Returner alle kommentarer som et array.

Brugseksempler

Tilføj en kommentar

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

Læs kommentarer

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

Se også

 Dansk