private void OnExtensions() { GUISettingsExtensions dlg = (GUISettingsExtensions)GUIWindowManager.GetWindow((int)Window.WINDOW_SETTINGS_EXTENSIONS); if (dlg == null) { return; } dlg.Section = _section; GUIWindowManager.ActivateWindow((int)Window.WINDOW_SETTINGS_EXTENSIONS); }
private bool OnEditSchedule(UpcomingProgram program) { if (program != null) { TvProgramInfo.CurrentProgram = _tvGuideAgent.GetProgramById(program.GuideProgramId.Value); TvProgramInfo.Channel = program.Channel; GUIWindowManager.ActivateWindow((int)WindowId.ProgramInfo); return(true); } return(false); }
void g_Player_PlayBackStartedFromGUI(g_Player.MediaType type, string filename) { if (g_Player.IsVideo) { g_Player.ShowFullScreenWindow(); } else if (_setting.JumpNowPlaying) { GUIWindowManager.ActivateWindow(25652); } }
private void OnPlayList() { GUISettingsPlaylist dlg = (GUISettingsPlaylist)GUIWindowManager.GetWindow((int)Window.WINDOW_SETTINGS_PLAYLIST); if (dlg == null) { return; } dlg.Section = _section; GUIWindowManager.ActivateWindow((int)Window.WINDOW_SETTINGS_PLAYLIST); }
/// <summary> /// We need to know what to do when exiting GUI. /// If the GUI started with the video FULLSCREEN it replaced the fullscreen window. We have to handle that gracefully. /// This method does that for you. /// </summary> public static void exitGUI() { if (wasFullScreenVideo && GUIGraphicsContext.IsPlayingVideo) { GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO, true); } else { GUIWindowManager.ShowPreviousWindow(); } }
private void OnFolders() { GUIShareFolders dlg = (GUIShareFolders)GUIWindowManager.GetWindow((int)Window.WINDOW_SETTINGS_FOLDERS); if (dlg == null) { return; } dlg.Section = _section; GUIWindowManager.ActivateWindow((int)Window.WINDOW_SETTINGS_FOLDERS); }
/// <summary> /// Shows the chat window. /// </summary> /// <param name="currentChatSession">The current chat session.</param> private void ShowChatWindow(Session currentChatSession) { // do not show info if no contact selected if (currentChatSession != null) { if (guiWindowChat != null) { GUIWindowManager.ActivateWindow(guiWindowChat.GetID); guiWindowChat.CurrentChatSession = currentChatSession; } } }
private static void ThreadActivateTheme(object param) { if (!(param is ThreadParams)) { Log.Error("param at ThreadActivateTheme has wrong type"); return; } ThreadParams threadParams = (ThreadParams)param; GUIWaitCursor.Show(); // Need to initialize fonts and references if they change based on the theme. // Check current theme. bool initFonts = (GUIGraphicsContext.HasThemeSpecificSkinFile(@"\fonts.xml")); bool initReferences = (GUIGraphicsContext.HasThemeSpecificSkinFile(@"\references.xml")); // Change the theme and save this new setting. SetTheme(threadParams._themeName); SkinSettings.Save(); // Check new theme. initFonts = initFonts || GUIGraphicsContext.HasThemeSpecificSkinFile(@"\fonts.xml"); initReferences = initReferences || GUIGraphicsContext.HasThemeSpecificSkinFile(@"\references.xml"); // Reset fonts if needed. if (initFonts) { // Reinitializing the device while changing fonts freezes the UI. // Add some sleep() to present the wait cursor animation for at least some user feedback. Thread.Sleep(500); GUIFontManager.ClearFontCache(); GUIFontManager.LoadFonts(GUIGraphicsContext.GetThemedSkinFile(@"\fonts.xml")); GUIFontManager.InitializeDeviceObjects(); Thread.Sleep(500); } // Force a reload of the control references if needed. if (initReferences) { GUIControlFactory.ClearReferences(); } // Reactivate the current window and refocus on the control used to change the theme. // This applies the new theme to the current window immediately. GUIWindowManager.ResetAllControls(); GUIWindowManager.SendThreadCallbackAndWait((p1, p2, p3) => { GUIWindowManager.ActivateWindow(p1, true, true, (int)p3); return(0); }, GUIWindowManager.ActiveWindow, 0, threadParams._focusControlId); GUIWaitCursor.Hide(); }
private static void SwitchToHomeView() { bool basicHome; using (Settings xmlreader = new MPSettings()) { basicHome = xmlreader.GetValueAsBool("gui", "startbasichome", false); } int homeWindow = basicHome ? (int)Window.WINDOW_SECOND_HOME : (int)Window.WINDOW_HOME; GUIWindowManager.ActivateWindow(homeWindow); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { MainMenu menu = new MainMenu(); menu.Add(btnGetMissingInfo, () => { VM_ShokoServer.Instance.ShokoServices.UpdateAnimeData(mainAnime.AnimeID); SetGUIProperty(GuiProperty.Character_Status, Translation.RequestSendToServerPleaseRefresh + "..."); m_Facade.Focus = true; }); menu.Add(btnRefreshView, () => { VM_ShokoServer.Instance.ShokoServices.UpdateAnimeData(mainAnime.AnimeID); SetGUIProperty(GuiProperty.Character_Status, Translation.RequestSendToServerPleaseRefresh + "..."); m_Facade.Focus = true; }); menu.Add(btnSeiyuu, () => GUIWindowManager.ActivateWindow(Constants.WindowIDs.ACTORS, false)); if (menu.Check(control)) { return; } try { if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { if (control == m_Facade) { GUIListItem item = m_Facade.SelectedListItem; if (item == null || item.TVTag == null || !(item.TVTag is CL_AniDB_Character)) { return; } CL_AniDB_Character aniChar = item.TVTag as CL_AniDB_Character; AniDB_Seiyuu actor = aniChar.Seiyuu; MainWindow.GlobalSeiyuuID = actor.AniDB_SeiyuuID; GUIWindowManager.ActivateWindow(Constants.WindowIDs.ACTORS, false); } } } // ReSharper disable EmptyGeneralCatchClause catch { } // ReSharper restore EmptyGeneralCatchClause base.OnClicked(controlId, control, actionType); }
public void DoPlay(YouTubeEntry vid, bool fullscr, GUIListControl facade) { if (vid != null) { VideoInfo qa = SelectQuality(vid); if (qa.Quality == VideoQuality.Unknow) { return; } Youtube2MP.temp_player.Reset(); Youtube2MP.temp_player.RepeatPlaylist = true; Youtube2MP.temp_player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC_VIDEO; PlayList playlist = Youtube2MP.temp_player.GetPlaylist(PlayListType.PLAYLIST_MUSIC_VIDEO); playlist.Clear(); g_Player.PlayBackStopped += new g_Player.StoppedHandler(g_Player_PlayBackStopped); AddItemToPlayList(vid, ref playlist, qa); if (facade != null) { qa.Items = new Dictionary <string, string>(); int selected = facade.SelectedListItemIndex; for (int i = selected + 1; i < facade.ListItems.Count; i++) { AddItemToPlayList(facade.ListItems[i], ref playlist, new VideoInfo(qa)); } } PlayListPlayer.SingletonPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_NONE; Youtube2MP.player.CurrentPlaylistType = PlayListType.PLAYLIST_NONE; Youtube2MP.temp_player.Play(0); if (g_Player.Playing && fullscr) { if (_setting.ShowNowPlaying) { GUIWindowManager.ActivateWindow(29052); } else { g_Player.ShowFullScreenWindow(); } } if (!g_Player.Playing) { Err_message("Unable to playback the item ! "); } } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { var selectedItem = this.Facade.SelectedListItem; if (selectedItem == null) { return; } var selectedSeason = selectedItem.TVTag as TraktSeasonSummary; if (selectedSeason == null) { return; } // don't bother loading seasons view if there is no episodes to display if (selectedSeason.EpisodeCount > 0) { // create loading parameter for episode listing var loadingParam = new SeasonLoadingParameter { Season = selectedSeason, Show = Show }; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.SeasonEpisodes, loadingParam.ToJSON()); } } break; // Layout Button case (2): CurrentLayout = GUICommon.ShowLayoutMenu(CurrentLayout, PreviousSelectedIndex); break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // Handle the click events, of this window if (control == btnPage100) { currentPageNumber = 0x100; currentSubPageNumber = 0; _numberOfRequestedUpdates++; _renderer.PageSelectText = Convert.ToString(currentPageNumber, 16); } if (control == btnPage200) { currentPageNumber = 0x200; currentSubPageNumber = 0; _numberOfRequestedUpdates++; _renderer.PageSelectText = Convert.ToString(currentPageNumber, 16); } if (control == btnPage300) { currentPageNumber = 0x300; currentSubPageNumber = 0; _numberOfRequestedUpdates++; _renderer.PageSelectText = Convert.ToString(currentPageNumber, 16); } if (control == btnHidden) { if (btnHidden != null) { _hiddenMode = btnHidden.Selected; _renderer.HiddenMode = btnHidden.Selected; _numberOfRequestedUpdates++; } } if (control == btnSubPage) { if (btnSubPage != null) { currentSubPageNumber = btnSubPage.SelectedItem; _numberOfRequestedUpdates++; } } if (control == btnFullscreen) { // First the fullscreen video and then switch to the new window. Otherwise the teletext isn't displayed GUIGraphicsContext.IsFullScreenVideo = true; GUIWindowManager.ActivateWindow((int)Window.WINDOW_FULLSCREEN_TELETEXT); } base.OnClicked(controlId, control, actionType); }
private void OnLanguageChanged() { // Backup the buttons, needed later BackupButtons(); SaveSettings(); GUILocalizeStrings.ChangeLanguage(_btnLanguage.Label); GUIFontManager.LoadFonts(GUIGraphicsContext.GetThemedSkinFile(@"\fonts.xml")); GUIFontManager.InitializeDeviceObjects(); GUIWindowManager.OnResize(); GUIWindowManager.ActivateWindow(GetID); // without this you cannot change skins / lang any more.. GUIControl.FocusControl(GetID, _btnLanguage.GetID); // Apply the selected buttons again, since they are cleared when we reload RestoreButtons(); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == listControl && actionType == Action.ActionType.ACTION_SELECT_ITEM && listControl.SelectedListItem != null) { DoPlay(listControl.SelectedListItem.MusicTag as YouTubeEntry, true, listControl); } else if (control == listsimilar && actionType == Action.ActionType.ACTION_SELECT_ITEM && listsimilar.SelectedListItem != null) { ArtistItem artistItem = listsimilar.SelectedListItem.MusicTag as ArtistItem; MessageGUI.Item = artistItem; GUIWindowManager.ActivateWindow(29050); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): var selectedItem = Facade.SelectedListItem; if (selectedItem == null) { return; } if (CurrentView == View.Summary) { if (selectedItem.TVTag as string == View.MovieCredits.ToString()) { LoadMovieCredits(); } else if (selectedItem.TVTag as string == View.ShowCredits.ToString()) { LoadShowCredits(); } } else if (CurrentView == View.MovieCredits) { GUIPersonMovieCredits.CurrentPerson = CurrentPerson; GUIPersonMovieCredits.CurrentCredits = selectedItem.MusicTag as TraktPersonMovieCredits; GUIPersonMovieCredits.CurrentCreditType = (Credit)selectedItem.TVTag; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.PersonCreditMovies); } else if (CurrentView == View.ShowCredits) { GUIPersonShowCredits.CurrentPerson = CurrentPerson; GUIPersonShowCredits.CurrentCredits = selectedItem.MusicTag as TraktPersonShowCredits; GUIPersonShowCredits.CurrentCreditType = (Credit)selectedItem.TVTag; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.PersonCreditShows); } break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { if (TraktSettings.EnableJumpToForTVShows) { CheckAndPlayEpisode(true); } else { GUIListItem selectedItem = this.Facade.SelectedListItem; if (selectedItem == null) { return; } var selectedShow = (TraktShowSummary)selectedItem.TVTag; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.ShowSeasons, selectedShow.ToJSON()); } } break; // Layout Button case (2): CurrentLayout = GUICommon.ShowLayoutMenu(CurrentLayout, PreviousSelectedIndex); break; // Hide Watched Button case (3): HideWatched = hideWatchedButton.Selected; dictRelatedShows.Remove(relatedShow.Slug); LoadRelatedShows(); GUIControl.FocusControl((int)TraktGUIWindows.RelatedShows, Facade.GetID); break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { MainMenu menu = new MainMenu(); menu.AddFunc(btnNavLeft, () => { GUIWindowManager.CloseCurrentWindow(); if (serMain.AnimeSeriesID != 0) { MainWindow.GlobalSeriesID = serMain.AnimeSeriesID; } GUIWindowManager.ActivateWindow(Constants.WindowIDs.CHARACTERS, false); return(true); }); menu.AddFunc(btnNavRight, () => { if (serMain.AnimeSeriesID != 0) { MainWindow.GlobalSeriesID = serMain.AnimeSeriesID; } GUIWindowManager.CloseCurrentWindow(); GUIWindowManager.ActivateWindow(Constants.WindowIDs.RELATIONS, false); return(true); }); menu.AddFunc(btnInfoPage, () => { HideControls(); dummyPageInfo.Visible = true; return(true); }); menu.AddFunc(btnStatsPage, () => { HideControls(); dummyPageStatistics.Visible = true; return(true); }); menu.AddFunc(btnGroupsPage, () => { HideControls(); dummyPageGroups.Visible = true; return(true); }); if (menu.Check(control)) { return; } base.OnClicked(controlId, control, actionType); }
private void OnSkinChanged() { // Backup the buttons, needed later BackupButtons(); // Set the skin to the selected skin and reload GUI GUIGraphicsContext.Skin = btnSkin.Label; SaveSettings(); GUITextureManager.Clear(); GUITextureManager.Init(); SkinSettings.Load(); GUIFontManager.LoadFonts(GUIGraphicsContext.GetThemedSkinFile(@"\fonts.xml")); GUIFontManager.InitializeDeviceObjects(); GUIExpressionManager.ClearExpressionCache(); GUIControlFactory.ClearReferences(); GUIControlFactory.LoadReferences(GUIGraphicsContext.GetThemedSkinFile(@"\references.xml")); GUIWindowManager.OnResize(); GUIWindowManager.ActivateWindow(GetID); GUIControl.FocusControl(GetID, btnSkin.GetID); // Apply the selected buttons again, since they are cleared when we reload RestoreButtons(); using (Settings xmlreader = new MPSettings()) { xmlreader.SetValue("general", "skinobsoletecount", 0); bool autosize = xmlreader.GetValueAsBool("gui", "autosize", true); if (autosize && !GUIGraphicsContext.Fullscreen) { try { GUIGraphicsContext.form.ClientSize = new Size(GUIGraphicsContext.SkinSize.Width, GUIGraphicsContext.SkinSize.Height); //Form.ActiveForm.ClientSize = new Size(GUIGraphicsContext.SkinSize.Width, GUIGraphicsContext.SkinSize.Height); } catch (Exception ex) { Log.Error("OnSkinChanged exception:{0}", ex.ToString()); Log.Error(ex); } } } if (BassMusicPlayer.Player != null && BassMusicPlayer.Player.VisualizationWindow != null) { BassMusicPlayer.Player.VisualizationWindow.Reinit(); } // Send a message that the skin has changed. GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SKIN_CHANGED, 0, 0, 0, 0, 0, null); GUIGraphicsContext.SendMessage(msg); }
private void OnRecord() { GUIListItem item = lcProgramList.SelectedListItem; if (item == null) { return; } if (item.TVTag == null) { return; } TVProgramInfo.CurrentProgram = (Program)item.TVTag; GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_TV_PROGRAM_INFO); }
private void OnEditWishItem() { GUIListItem item = lcProgramList.SelectedListItem; if (item == null) { return; } if (item.MusicTag == null) { return; } PTGEditWishItem.CurrentKeyWordID = ((PersonalTVGuideMap)item.MusicTag).IdKeyword; GUIWindowManager.ActivateWindow(6002); // 6002 = PTGEditWishItem }
private void OnClick(int itemNo) { GUIListItem item = GetItem(itemNo); if (item == null) { return; } TVProgramInfo.CurrentProgram = item.TVTag as Program; if (TVProgramInfo.CurrentProgram != null) { GUIWindowManager.ActivateWindow((int)Window.WINDOW_TV_PROGRAM_INFO); } return; }
private void GenreActions(MediaPortal.GUI.Library.Action.ActionType actionType) { if ((actionType == Action.ActionType.ACTION_MUSIC_PLAY) || (actionType == Action.ActionType.ACTION_PLAY) || (actionType == Action.ActionType.ACTION_PAUSE)) { if ((actionType == Action.ActionType.ACTION_MUSIC_PLAY) || (actionType == Action.ActionType.ACTION_PLAY) || (actionType == Action.ActionType.ACTION_PAUSE && !g_Player.HasVideo)) { List <DBArtistInfo> artistList = new List <DBArtistInfo>(); List <DBArtistInfo> artistFullList = DBArtistInfo.GetAll(); logger.Debug("Checking for matches for Genre : " + facadeLayout.SelectedListItem.Label); foreach (DBArtistInfo artistInfo in artistFullList) { if (tagMatched(facadeLayout.SelectedListItem.Label, artistInfo)) { logger.Debug("Matched Artist {0} with Tag {1}", artistInfo.Artist, facadeLayout.SelectedListItem.Label); if (!artistList.Contains(artistInfo)) { artistList.Add(artistInfo); } } } if (mvCentralCore.Settings.ClearPlaylistOnAdd) { ClearPlaylist(); } foreach (DBArtistInfo currArtist in artistList) { List <DBTrackInfo> artistTracks = DBTrackInfo.GetEntriesByArtist(currArtist); AddToPlaylist(artistTracks, false, false, mvCentralCore.Settings.GeneratedPlaylistAutoShuffle); } Player.playlistPlayer.Play(0); if (mvCentralCore.Settings.AutoFullscreen) { GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); } } else { _currentView = MvView.Genres; artistID = facadeLayout.SelectedListItem.ItemId; logger.Debug("Calling loadCurrent from GenreActions"); loadCurrent(); } } }
/// <summary> /// This function replaces g_player.ShowFullScreenWindowVideo /// </summary> ///<returns></returns> private static bool ShowFullScreenWindowVideoHandler() { if (g_Player.IsTVRecording) { // watching TV if (GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_TVFULLSCREEN) { return(true); } Log.Info("TVRecorded: ShowFullScreenWindow switching to fullscreen video"); GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_TVFULLSCREEN); GUIGraphicsContext.IsFullScreenVideo = true; return(true); } return(g_Player.ShowFullScreenWindowVideoDefault()); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { MainMenu menu = new MainMenu(); menu.Add(btnPosters, () => { GUIWindowManager.CloseCurrentWindow(); GUIWindowManager.ActivateWindow(Constants.WindowIDs.POSTERS, false); }); menu.Add(btnFanart, () => { GUIWindowManager.CloseCurrentWindow(); GUIWindowManager.ActivateWindow(Constants.WindowIDs.FANART, false); }); menu.Check(control); }
// start playback of a file (using known format) private void playFile(string media, VideoFormat videoFormat) { logger.Debug("Processing media for playback: File={0}, VideoFormat={1}", media, videoFormat); // HD Playback if (videoFormat == VideoFormat.Bluray || videoFormat == VideoFormat.HDDVD) { // Take proper action according to playback setting bool hdExternal = MovingPicturesCore.Settings.UseExternalPlayer; // Launch external player if user has configured it for HD playback. if (hdExternal) { LaunchHDPlayer(media); logger.Info("HD Playback: Internal, Media={0}", media); return; } } // We start listening to external player events listenToExternalPlayerEvents = true; // Enter full screen video and then play // prevents OSD showing before playback // Also appears that it enter playback faster! // Note: Playback Indicator will still be shown in skin // before playback actually starts ie. you're not going to see a black fullscreen GUIGraphicsContext.IsFullScreenVideo = true; GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); // Play the file using the mediaportal player bool success = g_Player.Play(media.Trim(), g_Player.MediaType.Video, g_Player.SetResumeBDTitleState, _forcePlay); // We stop listening to external player events listenToExternalPlayerEvents = false; // Need to send Fullscreen for Blu-ray media GUIGraphicsContext.IsFullScreenVideo = true; GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); // if the playback did not happen, reset the player if (!success) { logger.Info("Playback failed: Media={0}", media); resetPlayer(); } }
protected override void OnPageLoad() { base.OnPageLoad(); if (CurrentPerson == null || CurrentCredits == null) { TraktLogger.Info("Exiting Person Show Credits as there is no current person or credits set"); GUIWindowManager.ActivateWindow(GUIWindowManager.GetPreviousActiveWindow()); return; } // Init Properties InitProperties(); // Load Credits LoadCredits(); }
protected override void OnPageLoad() { if (!TVHome.Connected) { RemoteControl.Clear(); GUIWindowManager.ActivateWindow((int)Window.WINDOW_SETTINGS_TVENGINE); return; } TVHome.WaitForGentleConnection(); if (TVHome.Navigator == null) { TVHome.OnLoaded(); } else if (TVHome.Navigator.Channel == null) { TVHome.m_navigator.ReLoad(); TVHome.LoadSettings(false); } if (TVHome.m_navigator == null) { TVHome.m_navigator = new ChannelNavigator(); // Create the channel navigator (it will load groups and channels) } base.OnPageLoad(); if (btnPriorities != null) { btnPriorities.Visible = false; } //@ ConflictManager.OnConflictsUpdated += new MediaPortal.TV.Recording.ConflictManager.OnConflictsUpdatedHandler(ConflictManager_OnConflictsUpdated); LoadSettings(); needUpdate = false; selectedItem = null; LoadDirectory(); while (m_iSelectedItem >= GetItemCount() && m_iSelectedItem > 0) { m_iSelectedItem--; } GUIControl.SelectItemControl(GetID, listSchedules.GetID, m_iSelectedItem); btnSortBy.SortChanged += new SortEventHandler(SortChanged); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { var selectedUser = Facade.SelectedListItem.TVTag as TraktUserSummary; if (selectedUser == null) { break; } if (!selectedUser.IsPrivate) { GUIUserProfile.CurrentUser = selectedUser.Username; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.UserProfile); } else { if (GUIUtils.ShowYesNoDialog(Translation.Network, string.Format(Translation.SendFollowRequest, selectedUser.Username), true)) { GUINetwork.FollowUser(selectedUser); GUINetwork.ClearCache(); } } } break; // Layout Button case (2): CurrentLayout = GUICommon.ShowLayoutMenu(CurrentLayout, PreviousSelectedIndex); break; default: break; } base.OnClicked(controlId, control, actionType); }
/// <summary> /// This function replaces g_player.ShowFullScreenWindowTV /// </summary> ///<returns></returns> private static bool ShowFullScreenWindowTVHandler() { TvHome.SetRecordingChaptersAndJumpPoints(); if (g_Player.IsTVRecording) { // watching TV if (GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_TVFULLSCREEN) { return(true); } Log.Info("TVRecorded: ShowFullScreenWindow switching to fullscreen tv"); GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_TVFULLSCREEN); GUIGraphicsContext.IsFullScreenVideo = true; return(true); } return(g_Player.ShowFullScreenWindowTVDefault()); }