OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 19 Dec 2007 19:07:30 +0000 (19:07 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 19 Dec 2007 19:07:30 +0000 (19:07 +0000)
- 2 Small fixes to the new Chapters tab

git-svn-id: svn://localhost/HandBrake/trunk@1135 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/frmMain.cs

index 721d9b6..407d00b 100644 (file)
@@ -1928,15 +1928,23 @@ namespace Handbrake
                 data_chpt.Rows.Clear();\r
                 int i = 0;\r
                 int rowCount = 0;\r
+                int start = 0;\r
+                int finish = 0;\r
                 if (drop_chapterFinish.Text != "Auto")\r
-                    rowCount = int.Parse(drop_chapterFinish.Text);\r
+                    finish = int.Parse(drop_chapterFinish.Text);\r
+\r
+                if (drop_chapterStart.Text != "Auto")\r
+                     start = int.Parse(drop_chapterStart.Text);\r
+\r
+                rowCount = finish - (start -1);\r
+\r
                 while (i < rowCount)\r
                 {\r
                     DataGridViewRow row = new DataGridViewRow();\r
 \r
                     data_chpt.Rows.Insert(i, row);\r
                     data_chpt.Rows[i].Cells[0].Value = (i + 1);\r
-                    data_chpt.Rows[i].Cells[1].Value = "Chapter" + (i + 1);\r
+                    data_chpt.Rows[i].Cells[1].Value = "Chapter " + (i + 1);\r
                     i++;\r
                 }\r
             }\r
@@ -1962,7 +1970,7 @@ namespace Handbrake
                     csv.Append(row.Cells[0].Value.ToString());\r
                     csv.Append(",");\r
                     csv.Append(row.Cells[1].Value.ToString());\r
-                    csv.Append("\n");\r
+                    csv.Append(Environment.NewLine);\r
 \r
                 }\r
                 StreamWriter file = new StreamWriter(path);\r