Exemplo n.º 1
0
            void MovieController_Inputed(IFocusable sender, InputEventArgs args)
            {
                if (args.InputInfo.IsPressed(ButtonType.Left))
                {
                    list[currentIndex].Selected = false;
                    currentIndex--;
                    if (currentIndex < 0)
                    {
                        currentIndex = list.Length - 1;
                    }
                    list[currentIndex].Selected = true;
                }
                else if (args.InputInfo.IsPressed(ButtonType.Right))
                {
                    list[currentIndex].Selected = false;
                    currentIndex++;
                    if (currentIndex >= list.Length)
                    {
                        currentIndex = 0;
                    }
                    list[currentIndex].Selected = true;
                }
                else if (args.InputInfo.IsPressed(ButtonType.Circle))
                {
                    switch (currentIndex)
                    {
                    case 0:
                        moviePlayer.ToggleAspectRatio();
                        break;

                    case 1:
                        moviePlayer.SeekBackward();
                        break;

                    case 2:
                        moviePlayer.TogglePlayOrPause();
                        break;

                    case 3:
                        moviePlayer.Stop();
                        break;

                    case 4:
                        moviePlayer.SeekForward();
                        break;

                    case 5:
                        moviePlayer.CreateThumb();
                        break;

                    case 6:
                        if (PPDGeneralSetting.Setting.MovieLoopType >= MovieLoopType.Random)
                        {
                            PPDGeneralSetting.Setting.MovieLoopType = MovieLoopType.One;
                        }
                        else
                        {
                            PPDGeneralSetting.Setting.MovieLoopType++;
                        }
                        break;
                    }
                }
                else if (args.InputInfo.IsPressed(ButtonType.Cross) || args.InputInfo.IsPressed(ButtonType.Start))
                {
                    FocusManager.RemoveFocus();
                }
            }