summaryrefslogtreecommitdiffstats
path: root/win/C#/interop/SourceData
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/interop/SourceData')
-rw-r--r--win/C#/interop/SourceData/AudioTrack.cs38
-rw-r--r--win/C#/interop/SourceData/Chapter.cs4
-rw-r--r--win/C#/interop/SourceData/Subtitle.cs28
-rw-r--r--win/C#/interop/SourceData/SubtitleType.cs12
-rw-r--r--win/C#/interop/SourceData/Title.cs69
5 files changed, 78 insertions, 73 deletions
diff --git a/win/C#/interop/SourceData/AudioTrack.cs b/win/C#/interop/SourceData/AudioTrack.cs
index 5e5d4674d..76de1b65a 100644
--- a/win/C#/interop/SourceData/AudioTrack.cs
+++ b/win/C#/interop/SourceData/AudioTrack.cs
@@ -15,29 +15,38 @@ namespace HandBrake.Interop.SourceData
public class AudioTrack
{
/// <summary>
- /// The track number of this Audio Track
+ /// Gets or sets the track number of this Audio Track
/// </summary>
public int TrackNumber { get; set; }
/// <summary>
- /// The language (if detected) of this Audio Track
+ /// Gets or sets the language (if detected) of this Audio Track
/// </summary>
public string Language { get; set; }
+ /// <summary>
+ /// Gets or sets LanguageCode.
+ /// </summary>
public string LanguageCode { get; set; }
+ /// <summary>
+ /// Gets or sets Description.
+ /// </summary>
public string Description { get; set; }
/// <summary>
- /// The frequency (in MHz) of this Audio Track
+ /// Gets or sets the frequency (in MHz) of this Audio Track
/// </summary>
public int SampleRate { get; set; }
/// <summary>
- /// The bitrate (in kbps) of this Audio Track
+ /// Gets or sets the bitrate (in kbps) of this Audio Track
/// </summary>
public int Bitrate { get; set; }
+ /// <summary>
+ /// Gets Display.
+ /// </summary>
public string Display
{
get
@@ -46,6 +55,9 @@ namespace HandBrake.Interop.SourceData
}
}
+ /// <summary>
+ /// Gets NoTrackDisplay.
+ /// </summary>
public string NoTrackDisplay
{
get
@@ -63,16 +75,18 @@ namespace HandBrake.Interop.SourceData
return this.GetDisplayString(true);
}
+ /// <summary>
+ /// Get the Display String
+ /// </summary>
+ /// <param name="includeTrackNumber">
+ /// The include track number.
+ /// </param>
+ /// <returns>
+ /// A String
+ /// </returns>
private string GetDisplayString(bool includeTrackNumber)
{
- if (includeTrackNumber)
- {
- return this.TrackNumber + " " + this.Description;
- }
- else
- {
- return this.Description;
- }
+ return includeTrackNumber ? (this.TrackNumber + " " + this.Description) : this.Description;
}
}
} \ No newline at end of file
diff --git a/win/C#/interop/SourceData/Chapter.cs b/win/C#/interop/SourceData/Chapter.cs
index a5a0b8151..0c3077f7d 100644
--- a/win/C#/interop/SourceData/Chapter.cs
+++ b/win/C#/interop/SourceData/Chapter.cs
@@ -17,12 +17,12 @@ namespace HandBrake.Interop.SourceData
public class Chapter
{
/// <summary>
- /// The number of this Chapter, in regards to its parent Title
+ /// Gets or sets the number of this Chapter, in regards to its parent Title
/// </summary>
public int ChapterNumber { get; set; }
/// <summary>
- /// The length in time this Chapter spans
+ /// Gets or sets the length in time this Chapter spans
/// </summary>
public TimeSpan Duration { get; set; }
diff --git a/win/C#/interop/SourceData/Subtitle.cs b/win/C#/interop/SourceData/Subtitle.cs
index 2e186edcf..f460b16c2 100644
--- a/win/C#/interop/SourceData/Subtitle.cs
+++ b/win/C#/interop/SourceData/Subtitle.cs
@@ -15,37 +15,33 @@ namespace HandBrake.Interop.SourceData
public class Subtitle
{
/// <summary>
- /// The track number of this Subtitle
+ /// Gets or sets the track number of this Subtitle
/// </summary>
public int TrackNumber { get; set; }
/// <summary>
- /// The language (if detected) of this Subtitle
+ /// Gets or sets the language (if detected) of this Subtitle
/// </summary>
public string Language { get; set; }
/// <summary>
- /// Langauage Code
+ /// Gets or sets Langauage Code
/// </summary>
public string LanguageCode { get; set; }
+ /// <summary>
+ /// Gets or sets SubtitleType.
+ /// </summary>
public SubtitleType SubtitleType { get; set; }
/// <summary>
- /// Subtitle Type
+ /// Gets Subtitle Type
/// </summary>
public string TypeString
{
get
{
- if (this.SubtitleType == SubtitleType.Picture)
- {
- return "Bitmap";
- }
- else
- {
- return "Text";
- }
+ return this.SubtitleType == SubtitleType.Picture ? "Bitmap" : "Text";
}
}
@@ -57,13 +53,5 @@ namespace HandBrake.Interop.SourceData
{
return string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.TypeString);
}
-
- public string Display
- {
- get
- {
- return this.ToString();
- }
- }
}
} \ No newline at end of file
diff --git a/win/C#/interop/SourceData/SubtitleType.cs b/win/C#/interop/SourceData/SubtitleType.cs
index 419b1b515..5bbe5abc0 100644
--- a/win/C#/interop/SourceData/SubtitleType.cs
+++ b/win/C#/interop/SourceData/SubtitleType.cs
@@ -9,9 +9,21 @@
namespace HandBrake.Interop.SourceData
{
+ /// <summary>
+ /// Subtitle Type.
+ /// 0: Picture
+ /// 1: Text
+ /// </summary>
public enum SubtitleType
{
+ /// <summary>
+ /// Picture Subtitle
+ /// </summary>
Picture,
+
+ /// <summary>
+ /// Text Subtitle
+ /// </summary>
Text
}
}
diff --git a/win/C#/interop/SourceData/Title.cs b/win/C#/interop/SourceData/Title.cs
index 865891c89..61d6a6f68 100644
--- a/win/C#/interop/SourceData/Title.cs
+++ b/win/C#/interop/SourceData/Title.cs
@@ -11,7 +11,6 @@ namespace HandBrake.Interop.SourceData
{
using System;
using System.Collections.Generic;
- using System.Globalization;
using Model;
/// <summary>
@@ -19,74 +18,63 @@ namespace HandBrake.Interop.SourceData
/// </summary>
public class Title
{
- private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
- private readonly List<AudioTrack> audioTracks;
- private readonly List<Chapter> chapters;
- private readonly List<Subtitle> subtitles;
-
/// <summary>
- /// The constructor for this object
+ /// Initializes a new instance of the <see cref="Title"/> class.
/// </summary>
public Title()
{
- this.audioTracks = new List<AudioTrack>();
- this.chapters = new List<Chapter>();
- this.subtitles = new List<Subtitle>();
+ this.AudioTracks = new List<AudioTrack>();
+ this.Chapters = new List<Chapter>();
+ this.Subtitles = new List<Subtitle>();
}
/// <summary>
- /// Collection of chapters in this Title
+ /// Gets Collection of chapters in this Title
/// </summary>
- public List<Chapter> Chapters
- {
- get { return this.chapters; }
- }
+ public List<Chapter> Chapters { get; private set; }
/// <summary>
- /// Collection of audio tracks associated with this Title
+ /// Gets Collection of audio tracks associated with this Title
/// </summary>
- public List<AudioTrack> AudioTracks
- {
- get { return this.audioTracks; }
- }
+ public List<AudioTrack> AudioTracks { get; private set; }
/// <summary>
- /// Collection of subtitles associated with this Title
+ /// Gets Collection of subtitles associated with this Title
/// </summary>
- public List<Subtitle> Subtitles
- {
- get { return this.subtitles; }
- }
+ public List<Subtitle> Subtitles { get; private set; }
/// <summary>
- /// The track number of this Title (1-based).
+ /// Gets or sets The track number of this Title (1-based).
/// </summary>
public int TitleNumber { get; set; }
/// <summary>
- /// The length in time of this Title
+ /// Gets or sets The length in time of this Title
/// </summary>
public TimeSpan Duration { get; set; }
/// <summary>
- /// The resolution (width/height) of this Title
+ /// Gets or sets The resolution (width/height) of this Title
/// </summary>
public Size Resolution { get; set; }
/// <summary>
- /// The aspect ratio of this Title
+ /// Gets or sets The aspect ratio of this Title
/// </summary>
public double AspectRatio { get; set; }
+ /// <summary>
+ /// Gets or sets AngleCount.
+ /// </summary>
public int AngleCount { get; set; }
/// <summary>
- /// Par Value
+ /// Gets or sets Par Value
/// </summary>
public Size ParVal { get; set; }
/// <summary>
- /// The automatically detected crop region for this Title.
+ /// Gets or sets the automatically detected crop region for this Title.
/// This is an int array with 4 items in it as so:
/// 0:
/// 1:
@@ -94,6 +82,17 @@ namespace HandBrake.Interop.SourceData
/// 3:
/// </summary>
public Cropping AutoCropDimensions { get; set; }
+
+ /// <summary>
+ /// Gets Display.
+ /// </summary>
+ public string Display
+ {
+ get
+ {
+ return this.ToString();
+ }
+ }
/// <summary>
/// Override of the ToString method to provide an easy way to use this object in the UI
@@ -104,13 +103,5 @@ namespace HandBrake.Interop.SourceData
return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.TitleNumber, this.Duration.Hours,
this.Duration.Minutes, this.Duration.Seconds);
}
-
- public string Display
- {
- get
- {
- return this.ToString();
- }
- }
}
} \ No newline at end of file