Esempio n. 1
0
        private void checkState(Recognizer.State state)
        {
            if (this.currentState != state)
            {
                string text = new StringBuilder().append("Expected state ").append(state).append(" actual state ").append(this.currentState).toString();

                throw new IllegalStateException(text);
            }
        }
Esempio n. 2
0
 private void setState(Recognizer.State state)
 {
     this.currentState = state;
     lock (this.stateListeners)
     {
         Iterator iterator = this.stateListeners.iterator();
         while (iterator.hasNext())
         {
             StateListener stateListener = (StateListener)iterator.next();
             stateListener.statusChanged(this.currentState);
         }
     }
 }