X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=win%2FC%23%2FfrmQueue.cs;h=67251ccfddff024da6f225c6c9516eedb738eae2;hb=767a2b59ef7a2c41fd9f1a90b24436f5cba89964;hp=f9f59fee346e412f7df17e2800f142098e827f68;hpb=9c138236af326852e383d680cd63ec20dbc38d0c;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index f9f59fee..67251ccf 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -73,9 +73,10 @@ namespace Handbrake private void startProc(object state) { + // Reminder: There is still a bug here where the loop suddenly halts for no good reson. UpdateUIelements runs, then the loop finishes several items early. for (int i = 0; i < list_queue.Items.Count; i++) { - string query = list_queue.Items[i] as string; + string query = list_queue.Items[0] as string; Process hbProc = new Process(); hbProc.StartInfo.FileName = "hbcli.exe"; hbProc.StartInfo.Arguments = query; @@ -108,6 +109,8 @@ namespace Handbrake hbProc.WaitForExit(); hbProc.Close(); + hbProc.Dispose(); + updateUIElements(); } @@ -120,7 +123,6 @@ namespace Handbrake this.BeginInvoke(new ProgressUpdateHandler(updateUIElements)); return; } - this.list_queue.Items.RemoveAt(0); progressBar.PerformStep(); lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);