OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / Model / Subtitle.cs
1 /*  Subtitle.cs $\r
2     This file is part of the HandBrake source code.\r
3     Homepage: <http://handbrake.fr>.\r
4     It may be used under the terms of the GNU General Public License. */\r
5 \r
6 namespace Handbrake.Model\r
7 {\r
8     using System.Windows.Forms;\r
9 \r
10     /// <summary>\r
11     /// Subtitle Information\r
12     /// </summary>\r
13     public class SubtitleInfo\r
14     {\r
15         /// <summary>\r
16         /// Gets or sets the Subtitle Track\r
17         /// </summary>\r
18         public string Track { get; set; }\r
19 \r
20         /// <summary>\r
21         /// Gets or sets the Forced Subtitle\r
22         /// </summary>\r
23         public string Forced { get; set; }\r
24 \r
25         /// <summary>\r
26         /// Gets or sets the Burned In Subtitle\r
27         /// </summary>\r
28         public string Burned { get; set; }\r
29 \r
30         /// <summary>\r
31         /// Gets or sets the Default Subtitle Track\r
32         /// </summary>\r
33         public string Default { get; set; }\r
34 \r
35         /// <summary>\r
36         /// Gets or sets the SRT Language\r
37         /// </summary>\r
38         public string SrtLang { get; set; }\r
39 \r
40         /// <summary>\r
41         /// Gets or sets the SRT Character Code\r
42         /// </summary>\r
43         public string SrtCharCode { get; set; }\r
44 \r
45         /// <summary>\r
46         /// Gets or sets the SRT Offset\r
47         /// </summary>\r
48         public int SrtOffset { get; set; }\r
49 \r
50         /// <summary>\r
51         /// Gets or sets the Path to the SRT file\r
52         /// </summary>\r
53         public string SrtPath { get; set; }\r
54 \r
55         /// <summary>\r
56         /// Gets or sets the SRT Filename\r
57         /// </summary>\r
58         public string SrtFileName { get; set; }\r
59 \r
60         /// <summary>\r
61         /// Gets a value indicating whether this is an SRT subtitle.\r
62         /// </summary>\r
63         public bool IsSrtSubtitle\r
64         {\r
65             get { return this.SrtFileName != "-"; }\r
66         }\r
67 \r
68         /// <summary>\r
69         /// Gets A ListViewItem Containing information about this subitlte\r
70         /// </summary>\r
71         public ListViewItem ListView\r
72         {\r
73             get\r
74             {\r
75                 var listTrack = new ListViewItem(this.Track);\r
76                 listTrack.SubItems.Add(this.Forced);\r
77                 listTrack.SubItems.Add(this.Burned);\r
78                 listTrack.SubItems.Add(this.Default);\r
79                 listTrack.SubItems.Add(this.SrtLang);\r
80                 listTrack.SubItems.Add(this.SrtCharCode);\r
81                 listTrack.SubItems.Add(this.SrtOffset.ToString());\r
82                 return listTrack;\r
83             }\r
84         }\r
85     }\r
86 }