OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / Parsing / Chapter.cs
index 301fa57..31d57aa 100644 (file)
@@ -4,13 +4,13 @@
           Homepage: <http://handbrake.fr>.\r
           It may be used under the terms of the GNU General Public License. */\r
 \r
-using System;\r
-using System.Collections.Generic;\r
-using System.IO;\r
-using System.Text.RegularExpressions;\r
-\r
 namespace Handbrake.Parsing\r
 {\r
+    using System;\r
+    using System.Collections.Generic;\r
+    using System.IO;\r
+    using System.Text.RegularExpressions;\r
+\r
     /// <summary>\r
     /// An object representing a Chapter aosciated with a Title, in a DVD\r
     /// </summary>\r
@@ -47,17 +47,18 @@ namespace Handbrake.Parsing
 \r
         public static Chapter Parse(StringReader output)\r
         {\r
-            Match m = Regex.Match(output.ReadLine(),\r
+            Match m = Regex.Match(output.ReadLine(), \r
                                   @"^    \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
             if (m.Success)\r
             {\r
-                var thisChapter = new Chapter();\r
-                thisChapter.m_chapterNumber = int.Parse(m.Groups[1].Value.Trim());\r
-                thisChapter.m_duration = TimeSpan.Parse(m.Groups[5].Value);\r
+                var thisChapter = new Chapter\r
+                                      {\r
+                                          m_chapterNumber = int.Parse(m.Groups[1].Value.Trim()), \r
+                                          m_duration = TimeSpan.Parse(m.Groups[5].Value)\r
+                                      };\r
                 return thisChapter;\r
             }\r
-            else\r
-                return null;\r
+            return null;\r
         }\r
 \r
         public static Chapter[] ParseList(StringReader output)\r