PresentationAnimationsGenerator

PresentationAnimationsGenerator class

Représente un générateur des animations dans le Presentation.

public class PresentationAnimationsGenerator : IDisposable

Constructors

NomDescription
PresentationAnimationsGenerator(Presentation)Crée une nouvelle instance du PresentationAnimationsGenerator.
PresentationAnimationsGenerator(Size)Crée une nouvelle instance du PresentationAnimationsGenerator.

Properties

NomDescription
DefaultDelay { get; set; }Obtient ou définit le temps de retard par défaut [ms].
ExportedSlides { get; }Obtient le nombre de diapositives exportées.
IncludeHiddenSlides { get; set; }Obtient ou définit si les diapositives cachées doivent être incluses.

Methods

NomDescription
Dispose()Dispose l’instance du PresentationAnimationsGenerator.
Run(IEnumerable<ISlide>)Exécute la génération des événements d’animation pour chaque diapositive.
Run(IEnumerable<ISlide>, int, FrameTickHandler)Exécute la génération des événements d’animation pour chaque diapositive.

Fields

NomDescription
readonly FrameSizeObtient la taille du cadre.

Events

NomDescription
event NewAnimationUn événement représente qu’une nouvelle animation a été générée.

Examples

[C#]
using (Presentation presentation = new Presentation("animated.pptx"))
{
    using (var animationsGenerator = new PresentationAnimationsGenerator(presentation))
    using (var player = new PresentationPlayer(animationsGenerator, 33))
    {
        player.FrameTick += (sender, args) =>
        {
            args.GetFrame().Save($"frame_{sender.FrameIndex}.png");
        };

        animationsGenerator.Run(presentation.Slides);
    }
}

See Also