\r
private void startProc(object state)\r
{\r
+ // 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.\r
for (int i = 0; i < list_queue.Items.Count; i++)\r
{\r
- string query = list_queue.Items[i] as string;\r
+ string query = list_queue.Items[0] as string;\r
Process hbProc = new Process();\r
hbProc.StartInfo.FileName = "hbcli.exe";\r
hbProc.StartInfo.Arguments = query;\r
\r
hbProc.WaitForExit();\r
hbProc.Close();\r
+ hbProc.Dispose();\r
+ \r
\r
updateUIElements();\r
}\r
this.BeginInvoke(new ProgressUpdateHandler(updateUIElements));\r
return;\r
}\r
-\r
this.list_queue.Items.RemoveAt(0);\r
progressBar.PerformStep();\r
lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);\r