Export (0) Print
Expand All

StateChangedEventArgs Class

Class passed to handlers of events generated when a recognition engine state changes.

Namespace: System.Speech.Recognition
Assembly: System.Speech (in system.speech.dll)

public class StateChangedEventArgs : EventArgs
public class StateChangedEventArgs extends EventArgs
public class StateChangedEventArgs extends EventArgs
Not applicable.

StateChangedEventArgs derives from System.EventArgs and is passed to handlers for StateChanged events.

System state can be changed programmatically through by setting Enabled property of a recognition engine (Enabled and Enabled) or by system configuration through the Speech member of the ControlPanel.

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();
    };

System.Object
   System.EventArgs
    System.Speech.Recognition.StateChangedEventArgs

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft