Ejemplo n.º 1
0
        /// <summary>
        /// Set the Source Chapters List
        /// </summary>
        /// <param name="sourceChapters">
        /// The source chapters.
        /// </param>
        public void SetSourceChapters(IEnumerable <Chapter> sourceChapters)
        {
            // Cache the chapters in this screen
            this.SourceChapterList = new ObservableCollection <Chapter>(sourceChapters);
            this.Chapters.Clear();

            // Then Add new Chapter Markers.
            foreach (Chapter chapter in SourceChapterList)
            {
                ChapterMarker marker = new ChapterMarker(chapter.ChapterNumber, chapter.ChapterName);
                this.Chapters.Add(marker);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Set the Source Chapters List
        /// </summary>
        /// <param name="sourceChapters">
        /// The source chapters.
        /// </param>
        public void SetSourceChapters(IEnumerable <Chapter> sourceChapters)
        {
            // Cache the chapters in this screen
            this.SourceChapterList = new ObservableCollection <Chapter>(sourceChapters);
            this.Task.ChapterNames.Clear();

            // Then Add new Chapter Markers.
            int counter = 1;

            foreach (Chapter chapter in this.SourceChapterList)
            {
                string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName;
                var    marker      = new ChapterMarker(chapter.ChapterNumber, chapterName, chapter.Duration);
                this.Task.ChapterNames.Add(marker);

                counter += 1;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChapterMarker"/> class.
 /// Copy Constructor
 /// </summary>
 /// <param name="chapter">
 /// The chapter.
 /// </param>
 public ChapterMarker(ChapterMarker chapter)
 {
     this.ChapterName = chapter.ChapterName;
     this.ChapterNumber = chapter.ChapterNumber;
 }