/* Subtitle.cs $ This file is part of the HandBrake source code. Homepage: . It may be used under the terms of the GNU General Public License. */ using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; namespace HandBrake.SourceData { /// /// An object that represents a subtitle associated with a Title, in a DVD /// public class Subtitle { /// /// The track number of this Subtitle /// public int TrackNumber { get; set; } /// /// The language (if detected) of this Subtitle /// public string Language { get; set; } /// /// Langauage Code /// public string LanguageCode { get; set; } public SubtitleType SubtitleType { get; set; } /// /// Subtitle Type /// public string TypeString { get { if (this.SubtitleType == SubtitleType.Picture) { return "Bitmap"; } else { return "Text"; } } } /// /// Override of the ToString method to make this object easier to use in the UI /// /// A string formatted as: {track #} {language} public override string ToString() { return string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.TypeString); } public string Display { get { return this.ToString(); } } } }