void Win7UIAClientForm_FormClosed(object sender, FormClosedEventArgs e) { _mailProcessor.Uninitialize(); _mailProcessor = null; _synth.SpeakAsyncCancelAll(); _synth = null; }
void InitializeSample() { _synth = new SpeechSynthesizer(); // This sample app is only interested in when the text has been completely spoken. _synth.SpeakCompleted += new EventHandler <SpeakCompletedEventArgs>(_synth_SpeakCompleted); _mailProcessor = new MailProcessor(); _mailProcessor.Initialize(); }