private TimelineMediaMarker(TimelineMediaMarker timelineMediaMarker)
     : base(timelineMediaMarker)
 {
     AllowSeek = timelineMediaMarker.AllowSeek;
 }
 private void MarkerManager_MarkerReached(MediaMarkerManager<TimelineMediaMarker> markerManager, TimelineMediaMarker mediaMarker, bool seekedInto)
 {
     OnTimelineMarkerReached(mediaMarker, seekedInto);
 }
 private void MarkerManager_MarkerLeft(MediaMarkerManager<TimelineMediaMarker> markerManager, TimelineMediaMarker mediaMarker)
 {
     OnTimelineMarkerLeft(mediaMarker);
 }
 private void MarkerManager_MarkerSkipped(MediaMarkerManager<TimelineMediaMarker> markerManager, TimelineMediaMarker mediaMarker)
 {
     OnTimelineMarkerSkipped(mediaMarker);
 }
 private void MediaPlugin_MarkerReached(IMediaPlugin mediaPlugin, MediaMarker mediaMarker)
 {
     var timelineMarker = new TimelineMediaMarker
     {
         Begin = mediaMarker.Begin,
         Content = mediaMarker.Content,
         End = mediaMarker.End,
         Id = mediaMarker.Id,
         Type = mediaMarker.Type
     };
     Dispatcher.BeginInvoke(() => OnTimelineMarkerReached(timelineMarker, false));
 }
        /// <summary>
        /// Raises the TimelineMarkerSkipped event.
        /// </summary>
        protected virtual void OnTimelineMarkerSkipped(TimelineMediaMarker mediaMarker)
        {
            try
            {
                string message = string.Format(SilverlightMediaFrameworkResources.MarkerSkippedLogMessage,
                                               mediaMarker.Type, mediaMarker.Begin, mediaMarker.End);
                SendLogEntry(message: message, type: KnownLogEntryTypes.MarkerSkipped);

                TimelineMarkerSkipped.IfNotNull(i => i(this, new CustomEventArgs<TimelineMediaMarker>(mediaMarker)));
            }
            catch (Exception err)
            {
                string message = string.Format(SilverlightMediaFrameworkResources.GenericErrorOccurredLogMessage,
                                               "OnMarkerSkipped", err.Message);
                SendLogEntry(KnownLogEntryTypes.GeneralErrorOccurred, LogLevel.Error, message);
            }
        }
        /// <summary>
        /// Raises the TimelineMarkerReached event.
        /// </summary>
        protected virtual void OnTimelineMarkerReached(TimelineMediaMarker mediaMarker, bool seekedInto)
        {
            try
            {
                string message = string.Format(SilverlightMediaFrameworkResources.MarkerReachedLogMessage,
                                               mediaMarker.Type, mediaMarker.Begin, mediaMarker.End);
                SendLogEntry(message: message, type: KnownLogEntryTypes.MarkerReached);

                if (mediaMarker.Type == KnownMarkerTypes.Title)
                {
                    MediaTitleContent = mediaMarker.Content;
                }

                TimelineMarkerReached.IfNotNull(i => i(this, new TimelineMarkerReachedInfo { Marker = mediaMarker, SeekedInto = seekedInto }));
            }
            catch (Exception err)
            {
                string message = string.Format(SilverlightMediaFrameworkResources.GenericErrorOccurredLogMessage,
                                               "OnMarkerReached", err.Message);
                SendLogEntry(KnownLogEntryTypes.GeneralErrorOccurred, LogLevel.Error, message);
            }
        }
 private TimelineMediaMarker(TimelineMediaMarker timelineMediaMarker)
     : base(timelineMediaMarker)
 {
     AllowSeek = timelineMediaMarker.AllowSeek;
 }