public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { strButtonText = GUILocalizeStrings.Get(341); strButtonImage = string.Empty; strButtonImageFocus = string.Empty; strPictureImage = @"hover_play dvd.png"; return(true); }
private void OnAudioCodec() { string strAudioCodec = ""; using (Settings xmlreader = new MPSettings()) { strAudioCodec = xmlreader.GetValueAsString("movieplayer", "mpeg2audiocodec", ""); } ArrayList availableAudioFilters = FilterHelper.GetFilters(MediaType.Audio, MediaSubType.Mpeg2Audio); while (availableAudioFilters.Contains("CyberLink MPEG Muxer")) { availableAudioFilters.Remove("CyberLink MPEG Muxer"); } while (availableAudioFilters.Contains("Ulead MPEG Muxer")) { availableAudioFilters.Remove("Ulead MPEG Muxer"); } while (availableAudioFilters.Contains("PDR MPEG Muxer")) { availableAudioFilters.Remove("PDR MPEG Muxer"); } while (availableAudioFilters.Contains("Nero Mpeg2 Encoder")) { availableAudioFilters.Remove("Nero Mpeg2 Encoder"); } availableAudioFilters.Sort(); GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg != null) { dlg.Reset(); dlg.SetHeading(GUILocalizeStrings.Get(496)); //Menu int selected = 0; int count = 0; foreach (string codec in availableAudioFilters) { dlg.Add(codec); //delete if (codec == strAudioCodec) { selected = count; } count++; } dlg.SelectedLabel = selected; } dlg.DoModal(GetID); if (dlg.SelectedLabel < 0) { return; } using (Settings xmlwriter = new MPSettings()) { xmlwriter.SetValue("movieplayer", "mpeg2audiocodec", (string)availableAudioFilters[dlg.SelectedLabel]); } }
public void UpdateGui() { GUIListItem selectedItem = listControl.SelectedListItem; if (selectedItem != null) { if (selectedItem.MusicTag != null) { RadioTimeOutline radioItem = ((RadioTimeOutline)selectedItem.MusicTag); SetProperty("#selectedthumb", " "); logoImage.SetFileName(""); Process(); SetProperty("#selectedthumb", selectedItem.IconImageBig); logoImage.SetFileName(DownloadStationLogo(radioItem)); UpdateSelectedLabels(radioItem); } else { logoImage.SetFileName(string.Empty); GUIPropertyManager.SetProperty("#RadioTime.Selected.NowPlaying", " "); GUIPropertyManager.SetProperty("#RadioTime.Selected.Subtext", " "); GUIPropertyManager.SetProperty("#RadioTime.Selected.Format", " "); GUIPropertyManager.SetProperty("#RadioTime.Selected.Reliability", "0"); } } string textLine = string.Empty; View view = (View)mapSettings.ViewAs; bool sortAsc = mapSettings.SortAscending; switch (view) { case View.List: textLine = GUILocalizeStrings.Get(101); break; case View.Icons: textLine = GUILocalizeStrings.Get(100); break; case View.BigIcons: textLine = GUILocalizeStrings.Get(417); break; case View.Albums: textLine = GUILocalizeStrings.Get(529); break; case View.Filmstrip: textLine = GUILocalizeStrings.Get(733); break; } GUIControl.SetControlLabel(GetID, btnSwitchView.GetID, textLine); }
public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { // TODO: Add GUITetris.GetHome implementation strButtonText = GUILocalizeStrings.Get((int)Strings.MyTetris); strButtonImage = ""; strButtonImageFocus = ""; strPictureImage = @"hover_tetris.png"; return(true); }
protected override void OnPageLoad() { base.OnPageLoad(); if (m_Facade != null) { m_Facade.CurrentLayout = (GUIFacadeControl.Layout)CurrentView; } MediaPortal.GUI.Library.GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(136)); // Episode Formatting m_sFormatEpisodeTitle = DBOption.GetOptions(DBOption.cViewEpisodeTitle); m_sFormatEpisodeSubtitle = DBOption.GetOptions(DBOption.cViewEpisodeSecondTitle); m_sFormatEpisodeMain = DBOption.GetOptions(DBOption.cViewEpisodeMain); Helper.disableNativeAutoplay(); // Clear GUI Properties ClearGUIProperties(); LoadDirectory(string.Empty); if (g_Player.Playing && playlistPlayer.CurrentPlaylistType == PlayListType.PLAYLIST_TVSERIES) { int iCurrentItem = playlistPlayer.CurrentItem; if (iCurrentItem >= 0 && iCurrentItem <= m_Facade.Count) { GUIControl.SelectItemControl(GetID, m_Facade.GetID, iCurrentItem); } } // Prompt to load a Playlist if there is no items in current plalist if (m_Facade.Count <= 0 && btnLoad != null) { GUIControl.FocusControl(GetID, btnLoad.GetID); } if (m_Facade.Count > 0) { GUIControl.FocusControl(GetID, m_Facade.GetID); SelectCurrentItem(); } playlistPlayer.RepeatPlaylist = DBOption.GetOptions(DBOption.cRepeatPlaylist); if (btnRepeat != null) { btnRepeat.Selected = playlistPlayer.RepeatPlaylist; } playlistPlayer.PlaylistAutoPlay = DBOption.GetOptions(DBOption.cPlaylistAutoPlay); if (btnAutoPlay != null) { btnAutoPlay.Selected = playlistPlayer.PlaylistAutoPlay; btnAutoPlay.Label = Translation.ButtonAutoPlay; } }
private void OnPixelRatioCorrection() { bool usePixelRatioCorrection; using (Settings xmlreader = new MPSettings()) { usePixelRatioCorrection = xmlreader.GetValueAsBool("dvdplayer", "pixelratiocorrection", false); } GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; } dlg.Reset(); dlg.SetHeading(GUILocalizeStrings.Get(496)); //Menu dlg.AddLocalizedString(107); dlg.AddLocalizedString(106); // set the focus to currently used mode if (usePixelRatioCorrection) { dlg.SelectedLabel = 0; } else { dlg.SelectedLabel = 1; } // show dialog and wait for result dlg.DoModal(GetID); if (dlg.SelectedLabel == -1) { OnAspectRatio(); return; } if (dlg.SelectedLabel == 0) { usePixelRatioCorrection = true; } else { usePixelRatioCorrection = false; } using (Settings xmlwriter = new MPSettings()) { xmlwriter.SetValueAsBool("dvdplayer", "pixelratiocorrection", usePixelRatioCorrection);; } OnAspectRatio(); }
protected override string GetLocalizedViewLevel(string lvlName) { string localizedLevelName = string.Empty; switch (lvlName) { case "artist": localizedLevelName = GUILocalizeStrings.Get(133); break; case "albumartist": localizedLevelName = GUILocalizeStrings.Get(528); break; case "album": localizedLevelName = GUILocalizeStrings.Get(132); break; case "genre": localizedLevelName = GUILocalizeStrings.Get(135); break; case "year": localizedLevelName = GUILocalizeStrings.Get(987); break; case "composer": localizedLevelName = GUILocalizeStrings.Get(1214); break; case "conductor": localizedLevelName = GUILocalizeStrings.Get(1215); break; case "disc#": localizedLevelName = GUILocalizeStrings.Get(1216); break; case "title": case "timesplayed": case "rating": case "favorites": case "recently added": case "track": localizedLevelName = GUILocalizeStrings.Get(1052); break; default: localizedLevelName = lvlName; break; } return(localizedLevelName); }
private bool OnInit() { _Settings.Load(); if (_Settings.Music) { GUIControl.SelectControl(GetID, (int)Controls.ToggleMusic); } else { GUIControl.DeSelectControl(GetID, (int)Controls.ToggleMusic); } if (_Settings.Sound) { GUIControl.SelectControl(GetID, (int)Controls.ToggleSound); } else { GUIControl.DeSelectControl(GetID, (int)Controls.ToggleSound); } m_wndTetris = GetControl((int)Controls.Tetris) as MyTetrisControl; int nScore = 0; int nLines = 0; int nLevel = 0; if (m_wndTetris != null) { nScore = m_wndTetris.Score; nLines = m_wndTetris.Lines; nLevel = m_wndTetris.Level; m_wndTetris.Sound = _Settings.Sound; m_wndTetris.Music = _Settings.Music; // we don't get told when the green (return to home window) button is hit so // we make it look like we correctly paused the game when it was hit here if (m_wndTetris.State == State.Running) { m_wndTetris.State = State.Paused; } } GUIPropertyManager.SetProperty("#tetris_score", nScore.ToString()); GUIPropertyManager.SetProperty("#tetris_lines", nLines.ToString()); GUIPropertyManager.SetProperty("#tetris_level", nLevel.ToString()); GUIPropertyManager.SetProperty("#tetris_highscore", _Settings.Highscore.ToString()); GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get((int)Strings.MyTetris)); return(true); }
/// <summary> /// Updates the labels of the button /// </summary> private void UpdateButtonStates() { GUIControl.HideControl(GetID, facadeView.GetID); int iControl = facadeView.GetID; GUIControl.ShowControl(GetID, iControl); GUIControl.FocusControl(GetID, iControl); string strLine = String.Empty; View view = CurrentView; switch (view) { case View.List: strLine = GUILocalizeStrings.Get(101); break; case View.Icons: strLine = GUILocalizeStrings.Get(100); break; case View.LargeIcons: strLine = GUILocalizeStrings.Get(417); break; case View.FilmStrip: strLine = GUILocalizeStrings.Get(733); break; } GUIControl.SetControlLabel(GetID, btnViewAs.GetID, strLine); switch (CurrentSortMethod) { case VideoSort.SortMethod.Name: strLine = GUILocalizeStrings.Get(365); break; case VideoSort.SortMethod.Date: strLine = GUILocalizeStrings.Get(104); break; case VideoSort.SortMethod.Size: strLine = GUILocalizeStrings.Get(105); break; } if (btnSortBy != null) { btnSortBy.Label = strLine; btnSortBy.IsAscending = CurrentSortAsc; } }
protected override void OnPageLoad() { Log.Debug("zaposd pageload"); AllocResources(); ResetAllControls(); // make sure the controls are positioned relevant to the OSD Y offset m_bNeedRefresh = false; m_dateTime = DateTime.Now; channelNr = GetChannelNumber(); SetChannelIdAndName(); SetCurrentChannelLogo(); base.OnPageLoad(); GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(100000 + GetID)); }
public void SetNumberOfFiles(int iFiles) { //LoadSkin(); AllocResources(); InitControls(); SetControlLabel(GetID, 1, GUILocalizeStrings.Get(6037)); SetControlLabel(GetID, 2, GUILocalizeStrings.Get(6038)); SetControlLabel(GetID, 3, string.Empty); SetControlLabel(GetID, 4, string.Empty); SetControlLabel(GetID, 5, string.Empty); m_iNumberOfFiles = iFiles; lst_FilesNames = new ArrayList(); }
/// <summary> /// Thread, which runs the reorg in background /// </summary> public void ReorgAsync() { m_dbs.MusicDatabaseReorg(null); GUIDialogNotify dlgNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); if (null != dlgNotify) { dlgNotify.SetHeading(GUILocalizeStrings.Get(313)); dlgNotify.SetText(GUILocalizeStrings.Get(317)); dlgNotify.DoModal(_parentWindowID); } }
private void ResetData() { if (amazonWS == null) { return; } listView.Clear(); listView.KeepAspectRatio = false; listView.Visible = true; lblNoMatches.Visible = false; string noMatches = GUILocalizeStrings.Get(4516); if (noMatches.Length == 0) { noMatches = "No cover art found"; } lblNoMatches.Label = noMatches; lblAlbumName.Label = _Album; string coverArtText = GUILocalizeStrings.Get(4519); if (coverArtText.Length == 0) { coverArtText = "Current cover art"; } lblCoverLabel.Label = coverArtText; if (IsCompilationAlbum && _Artist.Length == 0) { lblArtistName.Label = GUILocalizeStrings.Get(340); } else { lblArtistName.Label = _Artist; } lblReleaseYear.Label = ""; if (!amazonWS.HasAlbums && !amazonWS.AbortGrab) { ShowNoMatchesText(); } lblAlbumName.AllowScrolling = false; lblArtistName.AllowScrolling = false; }
private void OnVideo() { GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg != null) { dlg.Reset(); dlg.SetHeading(GUILocalizeStrings.Get(496)); //Menu dlg.AddLocalizedString(1198); // Navigator dlg.AddLocalizedString(6000); // MPEG2 dlg.AddLocalizedString(6004); // Aspect Ratio dlg.AddLocalizedString(1029); // Subtitle _selectedOptionLvl2 = -1; if (_selectedOption != -1) { dlg.SelectedLabel = _selectedOption; } dlg.DoModal(GetID); if (dlg.SelectedId == -1) { return; } _selectedOption = dlg.SelectedLabel; switch (dlg.SelectedId) { case 1198: OnDVDNavigator(); break; case 6000: OnVideoCodec(); break; case 6004: OnAspectRatio(); break; case 1029: OnSubtitle(); break; } } }
private static string GetBeginningText(MediaType mediaType) { switch (mediaType) { case MediaType.LiveRecording: case MediaType.Recording: return GUILocalizeStrings.Get(979); case MediaType.DVD: case MediaType.Video: default: return GUILocalizeStrings.Get(1201); } }
private void OnDVDNavigator() { string strDVDNavigator = ""; using (Settings xmlreader = new MPSettings()) { strDVDNavigator = xmlreader.GetValueAsString("dvdplayer", "navigator", "DVD Navigator"); } ArrayList availableDVDNavigators = FilterHelper.GetDVDNavigators(); availableDVDNavigators.Sort(); GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; } dlg.Reset(); dlg.SetHeading(GUILocalizeStrings.Get(496)); //Menu int selected = 0; int count = 0; foreach (string codec in availableDVDNavigators) { dlg.Add(codec); if (codec == strDVDNavigator) { selected = count; } count++; } dlg.SelectedLabel = selected; dlg.DoModal(GetID); if (dlg.SelectedLabel < 0) { OnVideo(); return; } using (Settings xmlwriter = new MPSettings()) { xmlwriter.SetValue("dvdplayer", "navigator", (string)availableDVDNavigators[dlg.SelectedLabel]); } OnVideo(); }
private void SetProperties() { switch (_iQuality) { case 1: GUIPropertyManager.SetProperty("#thumbResolution", Convert.ToString((int)Thumbs.ThumbResolution) + " + " + Convert.ToString((int)Thumbs.ThumbLargeResolution)); GUIPropertyManager.SetProperty("#thumbCompositing", GUILocalizeStrings.Get(300014)); //High speed GUIPropertyManager.SetProperty("#thumbInterpolation", GUILocalizeStrings.Get(300015)); // Nearest neighbor GUIPropertyManager.SetProperty("#thumbSmoothing", GUILocalizeStrings.Get(231)); //None GUIPropertyManager.SetProperty("#thumbScreen", GUILocalizeStrings.Get(300016)); //Small CRTs break; case 2: GUIPropertyManager.SetProperty("#thumbResolution", Convert.ToString((int)Thumbs.ThumbResolution) + " + " + Convert.ToString((int)Thumbs.ThumbLargeResolution)); GUIPropertyManager.SetProperty("#thumbCompositing", GUILocalizeStrings.Get(300014)); //High speed GUIPropertyManager.SetProperty("#thumbInterpolation", GUILocalizeStrings.Get(883)); // Low GUIPropertyManager.SetProperty("#thumbSmoothing", GUILocalizeStrings.Get(300014)); //High speed GUIPropertyManager.SetProperty("#thumbScreen", GUILocalizeStrings.Get(300017)); //Small wide CRTs, medium CRTs break; case 3: GUIPropertyManager.SetProperty("#thumbResolution", Convert.ToString((int)Thumbs.ThumbResolution) + " + " + Convert.ToString((int)Thumbs.ThumbLargeResolution)); GUIPropertyManager.SetProperty("#thumbCompositing", GUILocalizeStrings.Get(886)); // Default GUIPropertyManager.SetProperty("#thumbInterpolation", GUILocalizeStrings.Get(886)); // Default GUIPropertyManager.SetProperty("#thumbSmoothing", GUILocalizeStrings.Get(886)); // Default GUIPropertyManager.SetProperty("#thumbScreen", GUILocalizeStrings.Get(300018)); //Large wide CRTs, small LCDs break; case 4: GUIPropertyManager.SetProperty("#thumbResolution", Convert.ToString((int)Thumbs.ThumbResolution) + " + " + Convert.ToString((int)Thumbs.ThumbLargeResolution)); GUIPropertyManager.SetProperty("#thumbCompositing", GUILocalizeStrings.Get(300019)); //Assume Linear GUIPropertyManager.SetProperty("#thumbInterpolation", GUILocalizeStrings.Get(300020)); //High Quality GUIPropertyManager.SetProperty("#thumbSmoothing", GUILocalizeStrings.Get(300020)); //High Quality GUIPropertyManager.SetProperty("#thumbScreen", GUILocalizeStrings.Get(300021)); //LCDs, Plasmas break; case 5: GUIPropertyManager.SetProperty("#thumbResolution", Convert.ToString((int)Thumbs.ThumbResolution) + " + " + Convert.ToString((int)Thumbs.ThumbLargeResolution)); GUIPropertyManager.SetProperty("#thumbCompositing", GUILocalizeStrings.Get(300020)); //High Quality GUIPropertyManager.SetProperty("#thumbInterpolation", GUILocalizeStrings.Get(300022)); //High Quality Bicubic GUIPropertyManager.SetProperty("#thumbSmoothing", GUILocalizeStrings.Get(300020)); //High Quality GUIPropertyManager.SetProperty("#thumbScreen", GUILocalizeStrings.Get(300023)); //Very large LCDs, Projectors break; } }
protected override string GetLocalizedViewLevel(string lvlName) { string localizedLevelName = string.Empty; switch (lvlName) { case "actor": localizedLevelName = GUILocalizeStrings.Get(344); break; case "genre": localizedLevelName = GUILocalizeStrings.Get(135); break; case "year": localizedLevelName = GUILocalizeStrings.Get(987); break; case "watched": case "unwatched": case "title": case "rating": case "recently added": case "recently watched": localizedLevelName = GUILocalizeStrings.Get(342); break; case "actorindex": localizedLevelName = GUILocalizeStrings.Get(1288); break; case "directorindex": localizedLevelName = GUILocalizeStrings.Get(1289); break; case "titleindex": localizedLevelName = GUILocalizeStrings.Get(1287); break; case "user groups": localizedLevelName = GUILocalizeStrings.Get(1265); break; default: localizedLevelName = lvlName; break; } return(localizedLevelName); }