/// <summary> /// Handles the PlayCommentEvent event. <seealso cref="RCE.Infrastructure.Events.PlayCommentEvent"/>. /// </summary> /// <param name="comment">Comment to be played.</param> private void PlayComment(Comment comment) { if (comment != null) { this.PlayerMode = PlayerMode.Comment; TimeSpan commentPosition = TimeSpan.FromSeconds(comment.MarkIn.GetValueOrDefault()); // To pause the aggregate model so that the OnFrameRendered event could not be triggered. this.PauseModel(); this.SetCurrentPosition(commentPosition); this.View.SetCurrentTime(commentPosition); this.eventAggregator.GetEvent <PositionUpdatedEvent>().Publish(new PositionPayloadEventArgs(commentPosition)); this.currentPlayingComment = comment; this.PlayModel(); } }
/// <summary> /// Filter that indicates whether a comment can be played or not. /// </summary> /// <param name="comment">Instance of the comment.</param> /// <returns>True if the comment can be played, otherwise [False].</returns> private static bool CanPlayComment(Comment comment) { return(comment != null && comment.MarkIn != null && comment.MarkOut != null && comment.MarkOut >= comment.MarkIn); }
public void AddComment(Comment comment) { throw new NotImplementedException(); }