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"); } }
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(); }
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"; } }