void OpenARunner(string[] files) { choose ch = new choose(this, checkBoxRemoveOutputFiles.Checked); ch.RunFiles(files); ch.Show(); }
void OpenARunnerBatch(string[] files) { if (listViewDefaultProfiles.Items.Count > 0) { this.textBoxRunLog.Text += "\r\n--- Starting Batch ---" + files.Length + " input files."; foreach (String file in files) { foreach (ListViewItem lvi in listViewDefaultProfiles.Items) { ListViewItem.ListViewSubItem presub = lvi.SubItems[1]; //Regex r = new Regex(@presub.Text); //if(r.IsMatch(file)) String inExt = Path.GetExtension(file); String pExt = presub.Text; if (inExt.EndsWith(pExt) || @presub.Text.Equals("*")) { choose ch = new choose(this, true, lvi.Text, new string[] { file }, checkBoxRemoveOutputFiles.Checked); this.textBoxRunLog.Text += "\r\n" + file + " match profile " + lvi.Text + "," + presub.Text; } else { this.textBoxRunLog.Text += "\r\n" + file + " did not match profile " + lvi.Text + "," + presub.Text; } } } } else { MessageBox.Show("No Batch profiles set.", "Batch Profile Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (checkBoxRemoveFiles.Checked) { listViewInputFiles.Items.Clear(); } }