private void InitRecognizer(Recognizer newRecognizer) { if (_recognizer == null) { _recognizer = newRecognizer; _recognizer.AddStateListener(this); } else if (_recognizer != newRecognizer) { _recognizer.RemoveStateListener(this); _recognizer = newRecognizer; _recognizer.AddStateListener(this); } }