blob: 0b0a741a08f8c5dddb5772fe08966b072a12eda3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Chapter.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// An object representing a Chapter aosciated with a Title, in a DVD
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
using System;
using System.Globalization;
/// <summary>
/// An object representing a Chapter aosciated with a Title, in a DVD
/// </summary>
public class Chapter
{
/// <summary>
/// Initializes a new instance of the <see cref="Chapter"/> class.
/// </summary>
public Chapter()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Chapter"/> class.
/// </summary>
/// <param name="number">
/// The number.
/// </param>
/// <param name="name">
/// The name.
/// </param>
/// <param name="duration">
/// The duration.
/// </param>
public Chapter(int number, string name, TimeSpan duration)
{
this.ChapterName = name;
this.ChapterNumber = number;
this.Duration = duration;
}
/// <summary>
/// Gets or sets The number of this Chapter, in regards to it's parent Title
/// </summary>
public int ChapterNumber { get; set; }
/// <summary>
/// Gets or sets ChapterName.
/// </summary>
public string ChapterName { get; set; }
/// <summary>
/// Gets or sets The length in time this Chapter spans
/// </summary>
public TimeSpan Duration { get; set; }
/// <summary>
/// Override of the ToString method to make this object easier to use in the UI
/// </summary>
/// <returns>A string formatted as: {chapter #}</returns>
public override string ToString()
{
return ChapterNumber.ToString(CultureInfo.InvariantCulture);
}
}
}
|