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

Tyto třídy spravují komentáře na úrovni snímků a jejich autory. Přístup k autorům komentářů přes Presentation.CommentAuthors a ke komentářům na jednotlivých snímcích přes Slide.GetSlideComments().

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

using Aspose.Slides.Foss;

Enumerations

public class Comment : IComment

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
TextstringEnumerationsText komentáře.
CreatedTimeDateTime?EnumerationsKdy byl komentář vytvořen.
SlideISlideEnumerationsSnímek, ke kterému komentář patří.
AuthorICommentAuthorEnumerationsAutor komentáře.
PositionPointFEnumerationsPozice na snímku.
ParentCommentIComment?EnumerationsNadřazený komentář pro vlákna odpovědí.

Enumerations

EnumerationsEnumerations
Remove()Odstranit tento komentář.

CommentAuthor

public class CommentAuthor : ICommentAuthor

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
NamestringEnumerationsZobrazované jméno autora.
InitialsstringEnumerationsIniciály autora.
CommentsICommentCollectionEnumerationsVšechny komentáře tohoto autora.

Enumerations

EnumerationsEnumerations
Remove()Odstranit tohoto autora a jeho komentáře.

CommentAuthorCollection

Přístupné přes Presentation.CommentAuthors.

public class CommentAuthorCollection : ICommentAuthorCollection

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
CountintEnumerationsPočet autorů.

Enumerations

EnumerationsEnumerationsEnumerations
AddAuthor(string name, string initials)ICommentAuthorPřidejte nového autora komentáře.
FindByName(string name)ICommentAuthor[]Najděte autory podle jména.
FindByNameAndInitials(string name, string initials)ICommentAuthor[]Najděte podle jména a iniciál.
RemoveAt(int index)voidOdstraňte autora na zadaném indexu.
Remove(ICommentAuthor author)voidOdstranit konkrétního autora.
Clear()voidOdstranit všechny autory.
ToArray()ICommentAuthor[]Vrátit všechny autory jako pole.

CommentCollection

Přístup přes CommentAuthor.Comments.

public class CommentCollection : ICommentCollection

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
CountintEnumerationsPočet komentářů.

Enumerations

EnumerationsEnumerationsEnumerations
AddComment(string text, ISlide slide, PointF position, DateTime creationTime)ICommentPřidat komentář k snímku.
InsertComment(int index, string text, ISlide slide, PointF position, DateTime creationTime)ICommentVložit komentář na konkrétní index.
FindCommentByIdx(int idx)ICommentNajít komentář podle indexu.
RemoveAt(int index)voidOdstranit komentář na indexu.
Remove(IComment comment)voidOdstranit konkrétní komentář.
Clear()voidOdstranit všechny komentáře.
ToArray()IComment[]Vrátit všechny komentáře jako pole.

Příklady použití

Přidat komentář

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

Číst komentáře

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

Viz také

 Čeština