private void runToolStripMenuItem1_Click(object sender, EventArgs e) { var attackTargetList = _testFile.GetAttackTargetList(); if (attackTargetList.Count == 0) //if still not set { string pattern = _testRunner.GetPatternOfRequestsToTest(); if (String.IsNullOrWhiteSpace(pattern)) { ErrorBox.ShowDialog(Resources.ErrorTestPatternMissing); return; } else { attackTargetList.Add("Default", new AttackTarget("Default", "Enabled", pattern)); _testFile.SetAttackTargetList(attackTargetList); } } SaveCurrent(); StartUI(); backgroundWorker1.RunWorkerAsync(); }