StateChangedEventArgs.RecognizerState Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan status mesin pengenalan ucapan bersama saat ini di Windows.
public:
property System::Speech::Recognition::RecognizerState RecognizerState { System::Speech::Recognition::RecognizerState get(); };
public System.Speech.Recognition.RecognizerState RecognizerState { get; }
member this.RecognizerState : System.Speech.Recognition.RecognizerState
Public ReadOnly Property RecognizerState As RecognizerState
Nilai Properti
RecognizerState Instans yang menunjukkan apakah status mesin pengenalan ucapan bersama adalah Listening
atau Stopped
.
Contoh
Contoh berikut memperbarui tampilan berdasarkan informasi status yang disediakan oleh RecognizerState instans yang diperoleh dari RecognizerState properti instans yang StateChangedEventArgs diteruskan ke handler untuk StateChanged suatu peristiwa.
// Make sure that _recognizer and recognition start buttons are disabled if state is stopped.
// Re-enable the start button to allow manual re-enable if the speech recognizer is listening.
_recognizer.StateChanged +=
delegate(object sender, StateChangedEventArgs eventArgs)
{
_recognizerStateLabel.Text = "Speech Recognizer State: " + eventArgs.RecognizerState.ToString();
};