summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs95
1 files changed, 95 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs
new file mode 100644
index 000000000..f69abed7d
--- /dev/null
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs
@@ -0,0 +1,95 @@
+/* SubtitleTrack.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Model.Encoding
+{
+ using System.Windows.Forms;
+
+ /// <summary>
+ /// Subtitle Information
+ /// </summary>
+ public class SubtitleTrack
+ {
+ /// <summary>
+ /// Gets or sets Track.
+ /// </summary>
+ public string Track { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether Forced.
+ /// </summary>
+ public bool Forced { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether Burned.
+ /// </summary>
+ public bool Burned { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether Default.
+ /// </summary>
+ public bool Default { get; set; }
+
+ #region SRT Specific Options
+
+ /// <summary>
+ /// Gets or sets the SRT Language
+ /// </summary>
+ public string SrtLang { get; set; }
+
+ /// <summary>
+ /// Gets or sets the SRT Character Code
+ /// </summary>
+ public string SrtCharCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the SRT Offset
+ /// </summary>
+ public int SrtOffset { get; set; }
+
+ /// <summary>
+ /// Gets or sets the Path to the SRT file
+ /// </summary>
+ public string SrtPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the SRT Filename
+ /// </summary>
+ public string SrtFileName { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether this is an SRT subtitle.
+ /// </summary>
+ public bool IsSrtSubtitle
+ {
+ get { return this.SrtFileName != "-"; }
+ }
+
+ #endregion
+
+ /// <summary>
+ /// Gets or sets the type of the subtitle
+ /// </summary>
+ public SubtitleType SubtitleType { get; set; }
+
+ /// <summary>
+ /// Gets A ListViewItem Containing information about this subitlte
+ /// </summary>
+ public ListViewItem ListView
+ {
+ get
+ {
+ var listTrack = new ListViewItem(this.Track);
+ listTrack.SubItems.Add(this.Forced ? "Yes" : "No");
+ listTrack.SubItems.Add(this.Burned ? "Yes" : "No");
+ listTrack.SubItems.Add(this.Default ? "Yes" : "No");
+ listTrack.SubItems.Add(this.SrtLang);
+ listTrack.SubItems.Add(this.SrtCharCode);
+ listTrack.SubItems.Add(this.SrtOffset.ToString());
+ return listTrack;
+ }
+ }
+ }
+} \ No newline at end of file