public GetLinkagesForChannel ( TvDatabase.Channel channel ) : IList |
||
channel | TvDatabase.Channel | |
return | IList |
private void ShowContextMenu() { if (dlg == null) { dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); } if (dlg == null) { return; } dlg.Reset(); dlg.SetHeading(924); // menu if (!g_Player.IsTVRecording && GUIGraphicsContext.DBLClickAsRightClick) { dlg.AddLocalizedString(10104); // TV MiniEPG } //dlg.AddLocalizedString(915); // TV Channels if (!g_Player.IsTVRecording) { dlg.AddLocalizedString(4); // TV Guide} } TvBusinessLayer layer = new TvBusinessLayer(); IList<ChannelLinkageMap> linkages = null; if (!g_Player.IsTVRecording) { linkages = layer.GetLinkagesForChannel(TVHome.Navigator.Channel); if (linkages != null) { if (linkages.Count > 0) { dlg.AddLocalizedString(200042); // Linked Channels } } } /*if (TVHome.Navigator.Groups.Count > 1) dlg.AddLocalizedString(971); // Group*/ if (!g_Player.IsTVRecording && TVHome.Card.HasTeletext) { dlg.AddLocalizedString(1441); // Fullscreen teletext } dlg.AddLocalizedString(941); // Change aspect ratio // msn related can be removed //if (PluginManager.IsPluginNameEnabled("MSN Messenger")) //{ // dlg.AddLocalizedString(12902); // MSN Messenger // dlg.AddLocalizedString(902); // MSN Online contacts //} //IAudioStream[] streams = TVHome.Card.AvailableAudioStreams; //if (streams != null && streams.Length > 0) if (g_Player.AudioStreams > 0) { dlg.AddLocalizedString(492); // Audio language menu } eAudioDualMonoMode dualMonoMode = g_Player.GetAudioDualMonoMode(); if (dualMonoMode != eAudioDualMonoMode.UNSUPPORTED) { dlg.AddLocalizedString(200059); // Audio dual mono mode menu } // SubTitle stream, show only when there exists any streams, // dialog shows then the streams and an item to disable them if (g_Player.SubtitleStreams > 0 || g_Player.SupportsCC) { dlg.AddLocalizedString(462); } // If the decoder supports postprocessing features (FFDShow) if (g_Player.HasPostprocessing) { dlg.AddLocalizedString(200073); } dlg.AddLocalizedString(11000); // Crop settings if (!g_Player.IsTVRecording) { dlg.AddLocalizedString(100748); // Program Information } if (!g_Player.IsTVRecording && Utils.FileExistsInCache(GUIGraphicsContext.Skin + @"\mytvtuningdetails.xml")) { dlg.AddLocalizedString(200041); // tuning details } TvServer server = new TvServer(); if (!g_Player.IsTVRecording) { VirtualCard vc; if (server.IsRecording(TVHome.Navigator.Channel.IdChannel, out vc)) { dlg.AddLocalizedString(265); //stop rec. } else { dlg.AddLocalizedString(601); //Record Now } } if (TVHome.Card.CiMenuSupported() && !g_Player.IsTVRecording) dlg.AddLocalizedString(2700); // CI Menu supported //dlg.AddLocalizedString(6008); // Sort TvChannel if (!g_Player.IsTVRecording && TVHome.Card.IsOwner() && !TVHome.Card.IsRecording && TVHome.Card.SupportsQualityControl()) { dlg.AddLocalizedString(882); } if (g_Player.HasChapters) // For recordings with chapters { dlg.AddLocalizedString(200091); } dlg.AddLocalizedString(368); // IMDB dlg.AddLocalizedString(970); // Previous window _isDialogVisible = true; dlg.DoModal(GetID); _isDialogVisible = false; Log.Debug("selected id:{0}", dlg.SelectedId); if (dlg.SelectedId == -1) { return; } switch (dlg.SelectedId) { case 4: // TVGuide { TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.KeyWord; GUIWindowManager.ActivateWindow((int)Window.WINDOW_TVGUIDE); break; } case 10104: // MiniEPG { ShowMiniEpg(); break; } case 941: // Change aspect ratio ShowAspectRatioMenu(); break; case 2700: // Open CI Menu PrepareCiMenu(); break; //case 6008: // TvChannel sort // SortChannels(); // break; case 492: // Show audio language menu ShowAudioLanguageMenu(); break; case 200059: ShowAudioDualMonoModeMenu(dualMonoMode); break; case 1441: // Fullscreen teletext GUIWindowManager.ActivateWindow((int)Window.WINDOW_FULLSCREEN_TELETEXT); break; case 970: // switch back to previous window _isOsdVisible = false; GUIWindowManager.IsOsdVisible = false; GUIGraphicsContext.IsFullScreenVideo = false; GUIWindowManager.ShowPreviousWindow(); break; case 11000: TvCropSettings cropSettings = (TvCropSettings)GUIWindowManager.GetWindow((int)Window.WINDOW_TV_CROP_SETTINGS); _isDialogVisible = true; cropSettings.DoModal(GetID); _isDialogVisible = false; break; case 100748: // Show Program Info ShowProgramInfo(); break; case 601: // RecordNow case 265: // StopRec. TVHome.ManualRecord(TVHome.Navigator.Channel, GetID); break; case 200042: // Linked channels CacheManager.Clear(); linkages = layer.GetLinkagesForChannel(TVHome.Navigator.Channel); ShowLinkedChannelsMenu(linkages); break; case 200041: // Tuning details GUIWindowManager.ActivateWindow((int)Window.WINDOW_TV_TUNING_DETAILS); break; case 882: // Quality settings ShowQualitySettingsMenu(); break; case 368: // IMDB OnGetIMDBInfo(); break; case 200091: ShowChapterStreamsMenu(); break; case 462: ShowSubtitleStreamsMenu(); break; case 200073: ShowPostProcessingMenu(); break; } }