OSDN Git Service

LinGui: make Help->Guide work on windows/mingw
[handbrake-jp/handbrake-jp-git.git] / win / C# / Functions / QueryGenerator.cs
index d9aaf07..e4557df 100644 (file)
@@ -252,7 +252,7 @@ namespace Handbrake.Functions
 \r
             #region Audio Settings Tab\r
 \r
-            ListView audioTracks = mainWindow.AudioSettings.GetAudioPanel();\r
+            DataGridView audioTracks = mainWindow.AudioSettings.GetAudioPanel();\r
             List<string> tracks = new List<string>();\r
             List<string> codecs = new List<string>();\r
             List<string> mixdowns = new List<string>();\r
@@ -261,40 +261,40 @@ namespace Handbrake.Functions
             List<string> drcs = new List<string>();\r
 \r
             // No Audio\r
-            if (audioTracks.Items.Count == 0)\r
+            if (audioTracks.Rows.Count == 0)\r
                 query += " -a none ";\r
 \r
             // Gather information about each audio track and store them in the declared lists.\r
-            foreach (ListViewItem row in audioTracks.Items)\r
+            foreach (DataGridViewRow row in audioTracks.Rows)\r
             {\r
                 // Audio Track (-a)\r
-                if (row.SubItems[1].Text == "Automatic")\r
+                if (row.Cells[1].Value.ToString() == "Automatic")\r
                     tracks.Add("1");\r
-                else if (row.Text != "None")\r
+                else if (row.Cells[1].Value.ToString() != "None")\r
                 {\r
-                    string[] tempSub = row.SubItems[1].Text.Split(' ');\r
+                    string[] tempSub = row.Cells[1].Value.ToString().Split(' ');\r
                     tracks.Add(tempSub[0]);\r
                 }\r
 \r
                 // Audio Codec (-E)\r
-                if (row.SubItems[2].Text != String.Empty)\r
-                    codecs.Add(GetAudioEncoder(row.SubItems[2].Text));\r
+                if (row.Cells[2].Value.ToString() != String.Empty)\r
+                    codecs.Add(GetAudioEncoder(row.Cells[2].Value.ToString()));\r
 \r
                 // Audio Mixdown (-6)\r
-                if (row.SubItems[3].Text != String.Empty)\r
-                    mixdowns.Add(GetMixDown(row.SubItems[3].Text));\r
+                if (row.Cells[3].Value.ToString() != String.Empty)\r
+                    mixdowns.Add(GetMixDown(row.Cells[3].Value.ToString()));\r
 \r
                 // Sample Rate (-R)\r
-                if (row.SubItems[4].Text != String.Empty)\r
-                    samplerates.Add(row.SubItems[4].Text);\r
+                if (row.Cells[4].Value.ToString() != String.Empty)\r
+                    samplerates.Add(row.Cells[4].Value.ToString());\r
 \r
                 // Audio Bitrate (-B)\r
-                if (row.SubItems[5].Text != String.Empty)\r
-                    bitrates.Add(row.SubItems[5].Text.Replace("Auto", "auto"));\r
+                if (row.Cells[5].Value.ToString() != String.Empty)\r
+                    bitrates.Add(row.Cells[5].Value.ToString().Replace("Auto", "auto"));\r
 \r
                 // DRC (-D)\r
-                if (row.SubItems[6].Text != String.Empty)\r
-                    drcs.Add(row.SubItems[6].Text);\r
+                if (row.Cells[6].Value.ToString() != String.Empty)\r
+                    drcs.Add(row.Cells[6].Value.ToString());\r
             }\r
 \r
             // Audio Track (-a)\r
@@ -442,7 +442,6 @@ namespace Handbrake.Functions
             if (Properties.Settings.Default.noDvdNav)\r
                 query += " --no-dvdnav";\r
 \r
-\r
             return query;\r
         }\r
 \r