summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/Main.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-01-22 21:13:59 +0000
committersr55 <[email protected]>2009-01-22 21:13:59 +0000
commit041ee4d8203087656775caecb5a312f246bdc2ae (patch)
tree0100b3ff617a7ec5d76881674c4e77c84dcab2d2 /win/C#/Functions/Main.cs
parente22c0e8c13d799104e616de5c469cb11b4defca0 (diff)
WinGui:
- Fixes/Tweaks to the chapter markers tab and handling code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2092 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/Main.cs')
-rw-r--r--win/C#/Functions/Main.cs24
1 files changed, 10 insertions, 14 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 1f14766c5..05bb00f56 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -106,7 +106,7 @@ namespace Handbrake.Functions
/// <summary>
/// Select the longest title in the DVD title dropdown menu on frmMain
/// </summary>
- public Handbrake.Parsing.Title selectLongestTitle(ComboBox drp_dvdtitle)
+ public Parsing.Title selectLongestTitle(ComboBox drp_dvdtitle)
{
int current_largest = 0;
Handbrake.Parsing.Title title2Select;
@@ -157,27 +157,23 @@ namespace Handbrake.Functions
/// Set's up the DataGridView on the Chapters tab (frmMain)
/// </summary>
/// <param name="mainWindow"></param>
- public DataGridView chapterNaming(DataGridView data_chpt, string chapter_start, string chapter_end)
+ public DataGridView chapterNaming(DataGridView data_chpt, string chapter_end)
{
- int i = 0, rowCount = 0, start = 0, finish = 0;
+ int i = 0, finish = 0;
if (chapter_end != "Auto")
int.TryParse(chapter_end, out finish);
- if (chapter_start != "Auto")
- int.TryParse(chapter_start, out start);
-
- rowCount = finish - (start - 1);
-
- while (i < rowCount)
+ while (i < finish)
{
- 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);
+ int n = data_chpt.Rows.Add();
+ data_chpt.Rows[n].Cells[0].Value = (i + 1);
+ data_chpt.Rows[n].Cells[1].Value = "Chapter " + (i + 1);
+ data_chpt.Rows[n].Cells[0].ValueType = typeof(int);
+ data_chpt.Rows[n].Cells[1].ValueType = typeof(string);
i++;
}
+
return data_chpt;
}