private void tsmi_emulateActivePhrase_Click(object sender, EventArgs e) { if (this.CurrentPhrase != null) { this.tb_RecognizedWord.BackColor = Color.Yellow; Application.DoEvents(); System.Threading.Thread.Sleep(2000); if (engine != null) engine.Dispose(); engine = new DialogueRecognitionEngine(this.currentProfile); engine.onWordRecognized += this.AddRecognizedText; if (!this.engine.Running) engine.EmulateRecognize(this.CurrentPhrase); this.tb_RecognizedWord.BackColor = SystemColors.Control; this.engine.Stop(); this.tb_RecognizedWord.Text = string.Empty; } }