// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// An object representing a Chapter aosciated with a Title, in a DVD
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
using System;
using System.Globalization;
///
/// An object representing a Chapter aosciated with a Title, in a DVD
///
public class Chapter
{
///
/// Initializes a new instance of the class.
///
public Chapter()
{
}
///
/// Initializes a new instance of the class.
///
///
/// The number.
///
///
/// The name.
///
///
/// The duration.
///
public Chapter(int number, string name, TimeSpan duration)
{
this.ChapterName = name;
this.ChapterNumber = number;
this.Duration = duration;
}
///
/// Gets or sets The number of this Chapter, in regards to it's parent Title
///
public int ChapterNumber { get; set; }
///
/// Gets or sets ChapterName.
///
public string ChapterName { get; set; }
///
/// Gets or sets The length in time this Chapter spans
///
public TimeSpan Duration { get; set; }
///
/// Override of the ToString method to make this object easier to use in the UI
///
/// A string formatted as: {chapter #}
public override string ToString()
{
return ChapterNumber.ToString(CultureInfo.InvariantCulture);
}
}
}