StateChangedEventArgs Class
Returns data from the StateChanged event.
Assembly: System.Speech (in System.Speech.dll)
The StateChanged event is raised by the
SpeechRecognitionEngine class.
System state can be changed programmatically by setting the Enabled() property of a recognition engine or through the Speech member of ControlPanel.
StateChangedEventArgs derives from [System.EventArgs] and is passed to handlers for StateChanged events.
The example below updates a display based on the state information provided by and instance of RecognizerState obtained from the RecognizerState property of an instance of StateChangedEventArgs passed to a handler for a StateChanged.
//Make sure that _recognizer and recognition start buttons are disabled if state is stopped.
//Reenable the start button to allow manual reenable if start is listening
_recognizer.StateChanged +=
delegate(object sender, StateChangedEventArgs eventArgs) {
_recognizerStateLabel.Text = "Speech Recognizer State: " + eventArgs.RecognizerState.ToString();
};
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.