OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / Parsing / DVD.cs
1 using System;\r
2 using System.Collections.Generic;\r
3 using System.Text;\r
4 using System.IO;\r
5 using System.Windows.Forms;\r
6 \r
7 \r
8 namespace Handbrake.Parsing\r
9 {\r
10     public class DVD\r
11     {\r
12         private List<Title> m_titles;\r
13         public List<Title> Titles\r
14         {\r
15             get\r
16             {\r
17                 return this.m_titles;\r
18             }\r
19         }\r
20 \r
21         public DVD()\r
22         {\r
23             this.m_titles = new List<Title>();\r
24         }\r
25 \r
26         public static DVD Parse(StreamReader output)\r
27         {\r
28             DVD thisDVD = new DVD();\r
29             while (!output.EndOfStream)\r
30             {\r
31                 string curLine = output.ReadLine();\r
32 \r
33                 if (curLine.Contains("Scanning title"))\r
34                 {\r
35                     thisDVD.m_titles.AddRange(Title.ParseList(output));\r
36                 }\r
37             }\r
38             return thisDVD;\r
39         }\r
40     }\r
41 }\r