Exemplo n.º 1
0
        private string GetAspectRatioCorrectionMode(AspectRatioCorrectionMode aspectRatioCorrectionMode)
        {
            switch (aspectRatioCorrectionMode)
            {
            case AspectRatioCorrectionMode.Crop:
                return("Crop");

            case AspectRatioCorrectionMode.Letterbox:
                return("Letterbox");

            case AspectRatioCorrectionMode.Stretch:
                return("Stretch");

            case AspectRatioCorrectionMode.Followstream:
                return("Follow stream");

            default:
                return("Follow stream");
            }
        }
Exemplo n.º 2
0
        private void OnAspectRatioCorrectionMode()
        {
            AspectRatioCorrectionMode aspectRatioCorrectionMode = AspectRatioCorrectionMode.Followstream;

            using (Settings xmlreader = new MPSettings())
            {
                string aspectRatioCorrectionModeText = xmlreader.GetValueAsString("dvdplayer", "armode", "Follow stream");
                aspectRatioCorrectionMode = GetAspectRatioCorrectionMode(aspectRatioCorrectionModeText);
            }
            GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU);

            if (dlg == null)
            {
                return;
            }
            dlg.Reset();
            dlg.SetHeading(GUILocalizeStrings.Get(496)); //Menu
            dlg.Add("Crop");
            dlg.Add("Letterbox");
            dlg.Add("Stretch");
            dlg.Add("Follow Stream");
            // set the focus to currently used mode
            dlg.SelectedLabel = (int)aspectRatioCorrectionMode;
            // show dialog and wait for result
            dlg.DoModal(GetID);

            if (dlg.SelectedId == -1)
            {
                OnAspectRatio();
                return;
            }

            aspectRatioCorrectionMode = GetAspectRatioCorrectionMode(dlg.SelectedLabelText);

            using (Settings xmlwriter = new MPSettings())
            {
                string aspectRatioCorrectionModetext = GetAspectRatioCorrectionMode(aspectRatioCorrectionMode);
                xmlwriter.SetValue("dvdplayer", "armode", aspectRatioCorrectionModetext);
            }
            OnAspectRatio();
        }
Exemplo n.º 3
0
    private string GetAspectRatioCorrectionMode(AspectRatioCorrectionMode aspectRatioCorrectionMode)
    {
      switch (aspectRatioCorrectionMode)
      {
        case AspectRatioCorrectionMode.Crop:
          return "Crop";

        case AspectRatioCorrectionMode.Letterbox:
          return "Letterbox";

        case AspectRatioCorrectionMode.Stretch:
          return "Stretch";

        case AspectRatioCorrectionMode.Followstream:
          return "Follow stream";

        default:
          return "Follow stream";
      }
    }