Пример #1
0
 public TimedTextElement()
 {
     Type       = "captionelement";
     Style      = new TimedTextStyle();
     animations = new MediaMarkerCollection <TimedTextAnimation>();
     children   = new MediaMarkerCollection <TimedTextElement>();
 }
Пример #2
0
        public TimedTextCaptions(IMarkerManager <CaptionRegion> CaptionManager = null, Func <MediaMarkerCollection <TimedTextElement>, IMarkerManager <TimedTextElement> > RegionManagerFactory = null)
        {
            DefaultStyleKey = typeof(TimedTextCaptions);

            factory.NewMarkers     += NewMarkers;
            factory.MarkersRemoved += MarkersRemoved;

            this.SizeChanged += this_SizeChanged;

            captionManager       = CaptionManager ?? new MediaMarkerManager <CaptionRegion>();
            regionManagerFactory = RegionManagerFactory ?? (m => new MediaMarkerManager <TimedTextElement>()
            {
                Markers = m
            });

            Captions = new MediaMarkerCollection <CaptionRegion>();

            captionManager.MarkerLeft    += captionManager_MarkerLeft;
            captionManager.MarkerReached += captionManager_MarkerReached;
        }