~ubuntu-branches/ubuntu/lucid/gnome-subtitles/lucid

« back to all changes in this revision

Viewing changes to sublib-0.8/src/SubLib/Application/Headers.cs

  • Committer: Bazaar Package Importer
  • Author(s): Tiago Bortoletto Vaz
  • Date: 2007-12-03 20:52:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071203205252-2y6uuv4gcw9mi9n5
Tags: 0.7-1
* New upstream release;
* Add libxml-parser-perl to Build-Depends-Indep. Thanks to Lucas Nussbaum.
  (Closes: #445799);
* Fixes manpage issue with dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of SubLib.
 
3
 * Copyright (C) 2006-2007 Pedro Castro
 
4
 *
 
5
 * SubLib is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * SubLib is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
using System;
 
21
using System.IO;
 
22
using System.Text;
 
23
 
 
24
namespace SubLib {
 
25
        
 
26
/// <summary>Represents the headers of the supported subtitle formats.</summary>
 
27
public class Headers {
 
28
 
 
29
        private string title = String.Empty;
 
30
        private string author = String.Empty;
 
31
        private string movieAuthor = String.Empty;
 
32
        private string artist = String.Empty;
 
33
        private string album = String.Empty;
 
34
        private string videoSource = String.Empty;
 
35
        private string subtitlesSource = String.Empty;
 
36
        private string program = String.Empty;
 
37
        private string version = String.Empty;
 
38
        private string comment = String.Empty;
 
39
        private string fontColor = "&HFFFFFF";
 
40
        private string fontStyle = "bd";
 
41
        private string fontName = "Tahoma";
 
42
        private string fileProperties = String.Empty;
 
43
        private string mediaType = "VIDEO";
 
44
        private string originalScript = "<unknown>";
 
45
        private string originalTranslation = String.Empty;
 
46
        private string originalEditing = String.Empty;
 
47
        private string originalTiming = String.Empty;
 
48
        private string originalScriptChecking = String.Empty;
 
49
        private string scriptUpdatedBy = String.Empty;
 
50
        private string collisions = String.Empty;
 
51
        private string timer = String.Empty;
 
52
        private string frameRate = String.Empty;
 
53
        private string date = DateTime.Today.ToString("yyyy-MM-dd");
 
54
        private int playResX = 0;
 
55
        private int playResY = 0;
 
56
        private int playDepth = 0;
 
57
        private int fontSize = 24;
 
58
        private int delay = 0;
 
59
        private int cdTrack = 0;
 
60
        
 
61
        /// <summary>The movie's title.</summary>
 
62
        public string Title {
 
63
                get { return title; }
 
64
                set { title = value; }
 
65
        }
 
66
 
 
67
        /// <summary>The subtitles' author.</summary>
 
68
        public string Author {
 
69
                get { return author; }
 
70
                set { author = value; }
 
71
        }
 
72
        
 
73
        /// <summary>The movie's author.</summary>
 
74
        public string MovieAuthor {
 
75
                get { return movieAuthor; }
 
76
                set { movieAuthor = value; }
 
77
        }
 
78
 
 
79
        /// <summary>The subtitles' artist.</summary>
 
80
        public string Artist {
 
81
                get { return artist; }
 
82
                set { artist = value; }
 
83
        }
 
84
        
 
85
        /// <summary>The subtitles' album.</summary>
 
86
        public string Album {
 
87
                get { return album; }
 
88
                set { album = value; }
 
89
        }
 
90
        
 
91
        /// <summary>The video' source.</summary>
 
92
        public string VideoSource {
 
93
                get { return videoSource; }
 
94
                set { videoSource = value; }
 
95
        }
 
96
        
 
97
        /// <summary>The subtitles' source.</summary>
 
98
        public string SubtitlesSource {
 
99
                get { return subtitlesSource; }
 
100
                set { subtitlesSource = value; }
 
101
        }
 
102
 
 
103
        /// <summary>The name of the subtitles' program.</summary>
 
104
        public string Program {
 
105
                get { return program; }
 
106
                set { program = value; }
 
107
        }
 
108
 
 
109
        /// <summary>The version of the subtitles.</summary>
 
110
        public string Version {
 
111
                get { return version; }
 
112
                set { version = value; }
 
113
        }
 
114
        
 
115
        /// <summary>A comment or note on the subtitles.</summary>
 
116
        public string Comment {
 
117
                get { return comment; }
 
118
                set { comment = value; }
 
119
        }
 
120
        
 
121
        /// <summary>The subtitles' font color.</summary>
 
122
        public string FontColor {
 
123
                get { return fontColor; }
 
124
                set { fontColor = value; }
 
125
        }
 
126
 
 
127
        /// <summary>The subtitles' font style.</summary>
 
128
        public string FontStyle {
 
129
                get { return fontStyle; }
 
130
                set { fontStyle = value; }
 
131
        }
 
132
 
 
133
        /// <summary>The subtitles' font name.</summary>
 
134
        public string FontName {
 
135
                get { return fontName; }
 
136
                set { fontName = value; }
 
137
        }
 
138
        
 
139
        /// <summary>The File properties, in the format 'size,md5'.</summary>
 
140
        public string FileProperties {
 
141
                get { return fileProperties; }
 
142
                set { fileProperties = value; }
 
143
        }
 
144
        
 
145
        /// <summary>The Media Type of the subtitles, which can be 'VIDEO' or 'AUDIO'.</summary>
 
146
        /// <remarks>This property is only set if the value is 'VIDEO' or 'AUDIO'. It's case insensitive.</remarks>
 
147
        public string MediaType {
 
148
                get { return mediaType; }
 
149
                set {
 
150
                        string type = value.ToUpper();
 
151
                        if (type.Equals("VIDEO") || type.Equals("AUDIO"))
 
152
                                mediaType = type;
 
153
                }
 
154
        }
 
155
        
 
156
        /// <summary>The Original Script of the subtitles.</summary>
 
157
        public string OriginalScript {
 
158
                get { return originalScript; }
 
159
                set { originalScript = value; }
 
160
        }
 
161
        
 
162
        /// <summary>The Original Translation of the subtitles.</summary>
 
163
        public string OriginalTranslation {
 
164
                get { return originalTranslation; }
 
165
                set { originalTranslation = value; }
 
166
        }
 
167
        
 
168
        /// <summary>The Original Editing of the subtitles.</summary>
 
169
        public string OriginalEditing {
 
170
                get { return originalEditing; }
 
171
                set { originalEditing = value; }
 
172
        }
 
173
        
 
174
        /// <summary>The Original Timing of the subtitles.</summary>
 
175
        public string OriginalTiming {
 
176
                get { return originalTiming; }
 
177
                set { originalTiming = value; }
 
178
        }
 
179
        
 
180
        /// <summary>The Original Script Checking of the subtitles.</summary>
 
181
        public string OriginalScriptChecking {
 
182
                get { return originalScriptChecking; }
 
183
                set { originalScriptChecking = value; }
 
184
        }
 
185
        
 
186
        /// <summary>The Script Updated By of the subtitles.</summary>
 
187
        public string ScriptUpdatedBy {
 
188
                get { return scriptUpdatedBy; }
 
189
                set { scriptUpdatedBy = value; }
 
190
        }
 
191
        
 
192
        /// <summary>The Collisions of the subtitles.</summary>
 
193
        public string Collisions {
 
194
                get { return collisions; }
 
195
                set { collisions = value; }
 
196
        }
 
197
        
 
198
        /// <summary>The Timer of the subtitles.</summary>
 
199
        public string Timer {
 
200
                get { return timer; }
 
201
                set { timer = value; }
 
202
        }
 
203
 
 
204
        /// <summary>The movie's frame rate.</summary>
 
205
        public string FrameRate {
 
206
                get { return frameRate; }
 
207
                set { frameRate = value; }
 
208
        }
 
209
        
 
210
        /// <summary>The subtitles' date.</summary>
 
211
        public string Date {
 
212
                get { return date; }
 
213
                set { date = value; }
 
214
        }
 
215
        
 
216
        /// <summary>The PlayResX of the subtitles.</summary>
 
217
        public int PlayResX {
 
218
                get { return playResX; }
 
219
                set { playResX = value; }
 
220
        }
 
221
        
 
222
        /// <summary>The PlayResX of the subtitles as text.</summary>
 
223
        public string PlayResXAsText {
 
224
                get { return playResX.ToString(); }
 
225
                set { 
 
226
                        try {
 
227
                                playResX = Convert.ToInt32(value);
 
228
                        }
 
229
                        catch (Exception) {
 
230
                        }
 
231
                 }
 
232
        }
 
233
        
 
234
        /// <summary>The PlayResY of the subtitles.</summary>
 
235
        public int PlayResY {
 
236
                get { return playResY; }
 
237
                set { playResY = value; }
 
238
        }
 
239
        
 
240
        /// <summary>The PlayResY of the subtitles as text.</summary>
 
241
        public string PlayResYAsText {
 
242
                get { return playResY.ToString(); }
 
243
                set { 
 
244
                        try {
 
245
                                playResY = Convert.ToInt32(value);
 
246
                        }
 
247
                        catch (Exception) {
 
248
                        }
 
249
                 }
 
250
        }
 
251
        
 
252
        /// <summary>The PlayDepth of the subtitles.</summary>
 
253
        public int PlayDepth {
 
254
                get { return playDepth; }
 
255
                set { playDepth = value; }
 
256
        }
 
257
        
 
258
        /// <summary>The PlayResY of the subtitles as text.</summary>
 
259
        public string PlayDepthAsText {
 
260
                get { return playDepth.ToString(); }
 
261
                set {
 
262
                        try {
 
263
                                playDepth = Convert.ToInt32(value);
 
264
                        }
 
265
                        catch (Exception) {
 
266
                        }
 
267
                 }
 
268
        }
 
269
        
 
270
        /// <summary>The subtitles' font size.</summary>
 
271
        public int FontSize {
 
272
                get { return fontSize; }
 
273
                set { fontSize = value; }
 
274
        }
 
275
        
 
276
        /// <summary>The subtitles' font size as text.</summary>
 
277
        public string FontSizeAsText {
 
278
                get { return fontSize.ToString(); }
 
279
                set { 
 
280
                        try {
 
281
                                fontSize = Convert.ToInt32(value);
 
282
                        }
 
283
                        catch (Exception) {
 
284
                        }
 
285
                 }
 
286
        }
 
287
        
 
288
        /// <summary>The delay of the subtitles.</summary>
 
289
        public int Delay {
 
290
                get { return delay; }
 
291
                set { delay = value; }
 
292
        }
 
293
        
 
294
        /// <summary>The delay of the subtitles as text.</summary>
 
295
        public string DelayAsText {
 
296
                get { return delay.ToString(); }
 
297
                set { 
 
298
                        try {
 
299
                                delay = Convert.ToInt32(value);
 
300
                        }
 
301
                        catch (Exception) {
 
302
                        }
 
303
                 }
 
304
        }
 
305
                
 
306
        /// <summary>The CD track of the subtitles.</summary>
 
307
        public int CDTrack {
 
308
                get { return cdTrack; }
 
309
                set { cdTrack = value; }
 
310
        }
 
311
        
 
312
        /// <summary>The CD track of the subtitles as text.</summary>
 
313
        public string CDTrackAsText {
 
314
                get { return cdTrack.ToString(); }
 
315
                set { 
 
316
                        try {
 
317
                                cdTrack = Convert.ToInt32(value);
 
318
                        }
 
319
                        catch (Exception) {
 
320
                        }
 
321
                 }
 
322
        }
 
323
        
 
324
}
 
325
 
 
326
}
 
 
b'\\ No newline at end of file'