From abe87eb4f8f239a6f950d8a549a5d9b75bc36365 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 19 Dec 2007 19:07:30 +0000 Subject: WinGui: - 2 Small fixes to the new Chapters tab git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1135 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmMain.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'win') diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 721d9b637..407d00be7 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1928,15 +1928,23 @@ namespace Handbrake data_chpt.Rows.Clear(); int i = 0; int rowCount = 0; + int start = 0; + int finish = 0; if (drop_chapterFinish.Text != "Auto") - rowCount = int.Parse(drop_chapterFinish.Text); + finish = int.Parse(drop_chapterFinish.Text); + + if (drop_chapterStart.Text != "Auto") + start = int.Parse(drop_chapterStart.Text); + + rowCount = finish - (start -1); + while (i < rowCount) { DataGridViewRow row = new DataGridViewRow(); data_chpt.Rows.Insert(i, row); data_chpt.Rows[i].Cells[0].Value = (i + 1); - data_chpt.Rows[i].Cells[1].Value = "Chapter" + (i + 1); + data_chpt.Rows[i].Cells[1].Value = "Chapter " + (i + 1); i++; } } @@ -1962,7 +1970,7 @@ namespace Handbrake csv.Append(row.Cells[0].Value.ToString()); csv.Append(","); csv.Append(row.Cells[1].Value.ToString()); - csv.Append("\n"); + csv.Append(Environment.NewLine); } StreamWriter file = new StreamWriter(path); -- cgit v1.2.3