diff options
author | sr55 <[email protected]> | 2007-07-09 18:41:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-07-09 18:41:29 +0000 |
commit | 0c236a598e46f41cf6dd8f5961bdc687c3799dff (patch) | |
tree | 3e0d1f410cdbc3f5f654b9c858c02e112fa1c53a /win/C#/frmReadDVD.cs | |
parent | 4a9e63938dd90a1ae640d9087daf24592fafb15f (diff) |
WinGui:
- Just a few updated files.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@662 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmReadDVD.cs')
-rw-r--r-- | win/C#/frmReadDVD.cs | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index 378642d05..23be024b8 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -75,13 +75,13 @@ namespace Handbrake if (line.Contains("exited.")){
subtitlePointer = false;
fullTitleData = titleData.Trim() + " ~ " + duationData.Trim() + " ~ " + sizeData.Trim() + " ~ " + cropdata.Trim() + " ~ " + chatperData.Trim() + " ~ " + audioData.Trim() + " ~ " + subtitleData.Trim();
- add(fullTitleData);
+ add(fullTitleData, titleData, duationData);
counter++;
}else if (line.Contains("+ title")){
if (titleData != "") {
subtitlePointer = true;
fullTitleData = titleData.Trim() + " ~ " + duationData.Trim() + " ~ " + sizeData.Trim() + " ~ " + cropdata.Trim() + " ~ " + chatperData.Trim() + " ~ " + audioData.Trim() + " ~ " + subtitleData.Trim();
- add(fullTitleData);
+ add(fullTitleData, titleData, duationData);
counter = counter + 1;
}
titleData = line;
@@ -172,30 +172,31 @@ namespace Handbrake }
}
- public void add(string titleData)
+ public void add(string fullTitleData, string titleData, string durationData)
{
- string[] titleInfo = new string[10];
- string[] str = new string[1];
- string title;
- string t ="";
- string d ="";
-
- titleInfo = titleData.Split('~');
try
{
- t = titleInfo[0].Trim().Substring(8).Replace(":", ""); // Title
- d = titleInfo[1].Trim().Substring(12); //Duration
- } catch(Exception){
- MessageBox.Show("Incomplete DVD data found. Please copy the data on the View DVD Information tab and report this error.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- }
+ string t = titleData.Trim().Substring(8).Replace(":", "");
+ string d = durationData.Trim().Substring(12);
+
+ // Lets store the captured full title data as a string in the programs settings file.
+ // This can then be used by the DVD title dropdown menu to populate other fields.
+
+ Properties.Settings.Default.FullDVDInfo = Properties.Settings.Default.FullDVDInfo + " \n " + fullTitleData;
- //Now lets add the info to the main form dropdowns
- frmMain form = (frmMain)frmMain.ActiveForm;
- title = t + " " + " " + d + " ";
- form.drp_dvdtitle.Items.Add(title);
+ //Now lets add the info to the main form dropdowns
+ frmMain form = (frmMain)frmMain.ActiveForm;
+ string title = t + " " + " " + d + " ";
+ form.drp_dvdtitle.Items.Add(title);
+ }
+ catch (Exception)
+ {
+ // Don't really need to do anything about it.
+ }
}
+
private void btn_ok_Click(object sender, EventArgs e)
{
scan(inputFile);
|