V1/Toolbox.NETMF.Hardware.Port/PushButtonInputPort.cs
/// <summary>
/// the working thread handler, as the manager of the auto-repeat
/// </summary>
the working thread handler, as the manager of the auto-repeat
the working thread handler as the manager of the auto - repeat
private void Worker()
        {
            if (this.Read() == this.ActiveLevel)
            {
                if (this._prevActivity)
                {
                     in progress
                    if (--this._counter <= 0)
                    {
                        this.OnStatusChanged();
                        this._counter = this._autoRepeatPeriodCount;
                    }
                }
                else
                {
                    this.OnStatusChanged();
                    this._prevActivity = true;
                    this._counter = (this._initialDelayCount > 0)
                        ? this._initialDelayCount
                        : this._autoRepeatPeriodCount;
                }
            }
            else if (this._prevActivity)
            {
                this.OnStatusChanged();
                this._counter = 0;
                this._prevActivity = false;
            }
        }
private void Worker ( ) { if ( this . Read ( ) == this . ActiveLevel ) { if ( this . _prevActivity ) { if ( -- this . _counter <= 0 ) { this . OnStatusChanged ( ) ; this . _counter = this . _autoRepeatPeriodCount ; } } else { this . OnStatusChanged ( ) ; this . _prevActivity = true ; this . _counter = ( this . _initialDelayCount > 0 ) ? this . _initialDelayCount : this . _autoRepeatPeriodCount ; } } else if ( this . _prevActivity ) { this . OnStatusChanged ( ) ; this . _counter = 0 ; this . _prevActivity = false ; } }
the working thread handler, as the manager of the auto-repeat
the working thread handler as the manager of the auto - repeat
//check the current level at the input port //activity //activity in progress //just pressed //just dropped into the inactivity