示例#1
0
 private void InitRecognizer(Recognizer newRecognizer)
 {
     if (_recognizer == null)
     {
         _recognizer = newRecognizer;
         _recognizer.AddResultListener(this);
         _recognizer.AddStateListener(this);
     }
     else if (_recognizer != newRecognizer)
     {
         _recognizer.RemoveResultListener(this);
         _recognizer.RemoveStateListener(this);
         _recognizer = newRecognizer;
         _recognizer.AddResultListener(this);
         _recognizer.AddStateListener(this);
     }
 }