void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { //throw new NotImplementedException(); switch (CurrentJob) { case JOb.recognise1: dataPipe = VoiceText.RecordText(5); break; case JOb.recognise2: dataPipe = VoiceText.RecordText(5); break; case JOb.addissue: redmine.rIssue issue = new redmine.rIssue() { ProjectId = projidPipe, TrackerId = trackidPipe, Title = IssueTitleText.Text, Description = textBox1.Text }; issuecreated = issue.Create(); break; default: break; } }