public void ChangeVideoContent(Content nextContent)
        {
            CurrentContent = nextContent;

            VideoContent video = (VideoContent)nextContent;

            VideoUrl = video.VideoUrl;
        }
        public void UpdateQuiz(Content content)
        {
            Quiz = (QuizContent)content;

            CurrentQuestion = Quiz.Questions[0];

            BindCurrentQuestion();
        }
        public void PublishNextContent(Content currentContent)
        {
            if (CurrentLesson.Contents.Count == 0)
                return;

            ActiveContentChangedEvent activeContentEvent = eventAggregator.GetEvent<ActiveContentChangedEvent>();

            if (currentContent == null)
            {
                activeContentEvent.Publish(CurrentLesson.Contents[0]);
            }
            else
            {
                int nextIndex = CurrentLesson.Contents.IndexOf(currentContent) + 1;
                if (CurrentLesson.Contents.Count == nextIndex)
                {
                    FinishLesson();
                    return;
                }

                activeContentEvent.Publish(CurrentLesson.Contents[nextIndex]);
            }
        }
        public void UpdateContentView(Content nextContent)
        {
            switch (nextContent.ContentType)
            {
                case ContentType.Video:
                    regionManager.ActivateViewInRegion<VideoContentView>("lesson_content_display");
                    break;
                case ContentType.Assessment:
                    regionManager.ActivateViewInRegion<QuizContentView>("lesson_content_display");
                    break;
                default:
                    throw new InvalidOperationException("Don't know what to do with " + nextContent.ContentType.ToString());
            }

            CurrentContent = nextContent;
        }
 public bool IsVideo(Content nextContent)
 {
     return nextContent.ContentType == ContentType.Video;
 }
 public bool IsQuiz(Content content)
 {
     return content.ContentType == ContentType.Assessment;
 }