public Batch CreateBatchFromGui() { var batch = new Batch() { TestCases = lbTestCases.Items.Cast<TestCase>().ToList(), Benchmarks = benchmarkList.CheckedItems.OfType<Benchmark>().ToList() }; return batch; }
void btnStart_Click(object sender, EventArgs e) { tbResults.Clear(); testedBatch = CreateBatchFromGui(); var validity = testedBatch.Validate(springDownloader, false); if (validity != "OK") { MessageBox.Show(validity); return; } testedBatch.RunCompleted += TestedBatchOnRunCompleted; testedBatch.AllCompleted += TestedBatchOnAllCompleted; new Thread(() => { testedBatch.Validate(springDownloader, true); testedBatch.RunTests(springPaths); }).Start(); btnStart.Enabled = false; btnStop.Enabled = true; }