/* Subtitle.cs $\r
- \r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
-using System.Windows.Forms;\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
\r
namespace Handbrake.Model\r
{\r
+ using System.Windows.Forms;\r
+\r
+ using HandBrake.ApplicationServices.Model;\r
+\r
/// <summary>\r
/// Subtitle Information\r
/// </summary>\r
public class SubtitleInfo\r
{\r
/// <summary>\r
- /// Subtitle Track\r
+ /// Gets or sets the Subtitle Track\r
/// </summary>\r
public string Track { get; set; }\r
\r
/// <summary>\r
- /// Forced Subtitle\r
+ /// Gets or sets the Forced Subtitle\r
/// </summary>\r
- public string Forced { get; set; }\r
+ public bool Forced { get; set; }\r
\r
/// <summary>\r
- /// Burned In Subtitle\r
+ /// Gets or sets the Burned In Subtitle\r
/// </summary>\r
- public string Burned { get; set; }\r
+ public bool Burned { get; set; }\r
\r
/// <summary>\r
- /// Default Subtitle Track\r
+ /// Gets or sets the Default Subtitle Track\r
/// </summary>\r
- public string Default { get; set; }\r
+ public bool Default { get; set; }\r
\r
/// <summary>\r
- /// SRT Language\r
+ /// Gets or sets the SRT Language\r
/// </summary>\r
public string SrtLang { get; set; }\r
\r
/// <summary>\r
- /// SRT Character Code\r
+ /// Gets or sets the SRT Character Code\r
/// </summary>\r
public string SrtCharCode { get; set; }\r
\r
/// <summary>\r
- /// SRT Offset\r
+ /// Gets or sets the SRT Offset\r
/// </summary>\r
public int SrtOffset { get; set; }\r
\r
/// <summary>\r
- /// Path to the SRT file\r
+ /// Gets or sets the Path to the SRT file\r
/// </summary>\r
public string SrtPath { get; set; }\r
\r
/// <summary>\r
- /// SRT Filename\r
+ /// Gets or sets the SRT Filename\r
/// </summary>\r
public string SrtFileName { get; set; }\r
\r
/// <summary>\r
- /// A ListViewItem Containing information about this subitlte\r
+ /// Gets a value indicating whether this is an SRT subtitle.\r
+ /// </summary>\r
+ public bool IsSrtSubtitle\r
+ {\r
+ get { return this.SrtFileName != "-"; }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Gets or sets the type of the subtitle\r
+ /// </summary>\r
+ public SubtitleType SubtitleType { get; set; }\r
+\r
+ /// <summary>\r
+ /// Gets A ListViewItem Containing information about this subitlte\r
/// </summary>\r
public ListViewItem ListView\r
{\r
get\r
{\r
- ListViewItem listTrack = new ListViewItem(Track);\r
- listTrack.SubItems.Add(Forced);\r
- listTrack.SubItems.Add(Burned);\r
- listTrack.SubItems.Add(Default);\r
- listTrack.SubItems.Add(SrtLang);\r
- listTrack.SubItems.Add(SrtCharCode);\r
- listTrack.SubItems.Add(SrtOffset.ToString());\r
+ var listTrack = new ListViewItem(this.Track);\r
+ listTrack.SubItems.Add(this.Forced ? "Yes" : "No");\r
+ listTrack.SubItems.Add(this.Burned ? "Yes" : "No");\r
+ listTrack.SubItems.Add(this.Default ? "Yes" : "No");\r
+ listTrack.SubItems.Add(this.SrtLang);\r
+ listTrack.SubItems.Add(this.SrtCharCode);\r
+ listTrack.SubItems.Add(this.SrtOffset.ToString());\r
return listTrack;\r
}\r
}\r
}\r
-}\r
+}
\ No newline at end of file