AGENT.Contrib.Hardware.CombinationAgentButtonListener.OnAgentButtonListenerPressed C# (CSharp) Method

OnAgentButtonListenerPressed() private method

private OnAgentButtonListenerPressed ( AgentButton button, InterruptPort port, AgentButtonState state, System.DateTime time ) : void
button AgentButton
port Microsoft.SPOT.Hardware.InterruptPort
state AgentButtonState
time System.DateTime
return void
		private void OnAgentButtonListenerPressed (AgentButton button, InterruptPort port, AgentButtonState state, DateTime time)
		{
			var previousPressedButtons = GetPressedButtons ();
			m_ButtonToStateMap[button] = state;
			var currentPressedButtons = GetPressedButtons ();

			if (OnButtonStateChange == null) return; // no listeners

			OnButtonStateChange (previousPressedButtons, currentPressedButtons, button, state, time);
		}