public void SetPin(int pin)
        {
            MediaPortal.GUI.Library.Action.ActionType type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_0;
            switch (pin)
            {
                case 0:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_0;
                    break;
                case 1:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_1;
                    break;
                case 2:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_2;
                    break;
                case 3:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_3;
                    break;
                case 4:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_4;
                    break;
                case 5:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_5;
                    break;
                case 6:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_6;
                    break;
                case 7:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_7;
                    break;
                case 8:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_8;
                    break;
                case 9:
                    type = MediaPortal.GUI.Library.Action.ActionType.REMOTE_9;
                    break;
            }

            MediaPortal.GUI.Library.Action pinAction = new MediaPortal.GUI.Library.Action(type, 0, 0);
            mpDialog.OnAction(pinAction);
        }
Esempio n. 2
0
        /// <summary>
        /// Set Rating for this dialog
        /// </summary>
        /// <param name="rating"></param>
        public void SetRating(int rating)
        {
            MediaPortal.GUI.Library.Action ratingAction = null; ;
            switch (rating)
            {
                case 1:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_1, 0, 0);
                    break;
                case 2:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_2, 0, 0);
                    break;
                case 3:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_3, 0, 0);
                    break;
                case 4:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_4, 0, 0);
                    break;
                case 5:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_5, 0, 0);
                    break;
                case 6:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_6, 0, 0);
                    break;
                case 7:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_7, 0, 0);
                    break;
                case 8:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_8, 0, 0);
                    break;
                case 9:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_9, 0, 0);
                    break;
                case 10:
                    ratingAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.REMOTE_0, 0, 0);
                    break;
            }

            if (ratingAction != null)
            {
                mpDialog.OnAction(ratingAction);
            }
        }
 public void RemovePin()
 {
     MediaPortal.GUI.Library.Action pinAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.ACTION_DELETE_ITEM, 0, 0);
     mpDialog.OnAction(pinAction);
 }
Esempio n. 4
0
 public void ConfirmRating()
 {
     MediaPortal.GUI.Library.Action confirmAction = new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.ACTION_SELECT_ITEM, 0, 0);
     mpDialog.OnAction(confirmAction);
 }