Пример #1
0
 /// OnAction handler; if any action is received then last busy time is reset (i.e. idletimeout is reset)
 /// </summary>
 /// <param name="action">action message sent by the system</param>
 private void OnAction(MediaPortal.GUI.Library.Action action)
 {
   if (action.IsUserAction())
   {
     // Log.Debug("PS: Action {0} detected - reset time of last user activity and system idle timer", action.wID);
     _lastUserTime = DateTime.Now;
     PowerManager.ResetIdleTimer();
   }
 }
Пример #2
0
        public override void OnAction(MediaPortal.GUI.Library.Action action)
        {
            if (viewIsLarger)
            {
                if (action.m_key.KeyCode == 27)
                {
                    // makes esc exit fullscreen
                    //hide fullscreen
                    dummyLarger.Visible = true;
                    viewIsLarger = false;
                    return;
                }
                if (action.IsUserAction())
                {
                    //this stops the selection wondering around the screen
                    return;
                }
            }

            switch (action.wID)
            {
                case MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_DOWN:
                case MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_LEFT:
                case MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_RIGHT:
                case MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_UP:

                    base.OnAction(action);
                    break;
                default:
                    base.OnAction(action);
                    break;
            }
        }