public void UpdateVolumeProperties() { float fRange = (float)(Instance.Maximum - Instance.Minimum); float fPos = (float)(Instance.Volume - Instance.Minimum); float fPercent = (fPos / fRange) * 100.0f; GUIPropertyManager.SetProperty("#volume.percent", ((int)Math.Round(fPercent)).ToString()); GUIPropertyManager.SetProperty("#volume.mute", Instance.IsMuted.ToString().ToLowerInvariant()); }
protected override void OnPageDestroy(int newWindowId) { base.OnPageDestroy(newWindowId); if (m_bNewBehaviour) { GUIPropertyManager.SetProperty("#selecteditem", m_strLastSelectedItem); } }
public void SetSkinProperties(ArtistItem artistItem, string prefix) { GUIPropertyManager.SetProperty("#Youtube.fm." + prefix + ".Artist.Image", " "); GUIPropertyManager.SetProperty("#Youtube.fm." + prefix + ".Artist.Name", Property(artistItem.Name)); GUIPropertyManager.SetProperty("#Youtube.fm." + prefix + ".Artist.Bio", Property(artistItem.Bio)); GUIPropertyManager.SetProperty("#Youtube.fm." + prefix + ".Artist.Tags", Property(artistItem.Tags)); GUIPropertyManager.SetProperty("#Youtube.fm." + prefix + ".Artist.Image", Property(artistItem.LocalImage)); }
protected override void OnPageLoad() { if (firstLoad) { firstLoad = false; GUIPropertyManager.SetProperty("#Emulators2.PreviewVideo.playing", "no"); //Image Handlers backdrop = new ImageSwapper(); backdrop.ImageResource.Delay = Options.Instance.GetIntOption("fanartdelay"); backdrop.PropertyOne = "#Emulators2.CurrentItem.fanartpath"; backdrop.PropertyTwo = "#Emulators2.CurrentItem.fanartpath2"; newGUIHandler = new GUIPresenter(); newGUIHandler.OnSortAscendingChanged += new GUIPresenter.SortAscendingChanged(newGUIHandler_OnSortAscendingChanged); newGUIHandler.OnPreviewVideoStatusChanged += new GUIPresenter.PreviewVideoStatusChanged(newGUIHandler_OnPreviewVideoStatusChanged); GUIPropertyManager.SetProperty("#Emulators2.plugintitle", Options.Instance.GetStringOption("shownname")); onVideoStopped = new g_Player.StoppedHandler(g_Player_PlayBackStopped); onVideoEnded = new g_Player.EndedHandler(g_Player_PlayBackEnded); } base.OnPageLoad(); DBItem startupItem = null; bool launch = false; getStartupSettings(ref startupItem, ref launch); if (buttonSort != null) { buttonSort.IsAscending = newGUIHandler.SortAscending; buttonSort.SortChanged += new SortEventHandler(newGUIHandler.OnSort); } if (Options.Instance.GetBoolOption("showfanart")) { backdrop.GUIImageOne = fanartControl1; backdrop.GUIImageTwo = fanartControl2; } if (gameArtEnabled != null) { gameArtEnabled.Visible = Options.Instance.GetBoolOption("showgameart"); //update gameart dummy control visibility } if (Options.Instance.GetBoolOption("showvideopreview")) { if (videoPreviewEnabled != null) { videoPreviewEnabled.Visible = true; //videoPreview dummy } } g_Player.PlayBackStopped += onVideoStopped; g_Player.PlayBackEnded += onVideoEnded; newGUIHandler.Load(facade, backdrop, startupItem, launch, showVideoPreviewControl, goodmergeList, details_play); }
void OnSearchResultSelected(GUIListItem item, GUIControl parent) { TorrentMatch selectedmatch = item.AlbumInfoTag as TorrentMatch; Thread backdrop = new Thread(delegate() { if (!string.IsNullOrEmpty(selectedmatch.tvdb)) { TraktShow show = TraktAPI.SeriesOverview(selectedmatch.tvdb); if (!string.IsNullOrEmpty(show.Title)) { GUIPropertyManager.SetProperty("#MyTorrents.Backdrop", show.Images.Fanart); GUIPropertyManager.SetProperty("#MyTorrents.Poster", show.Images.Poster); GUIPropertyManager.SetProperty("#MyTorrents.Title", show.Title); GUIPropertyManager.SetProperty("#MyTorrents.Year", show.Year.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.Summary", show.Overview); GUIPropertyManager.SetProperty("#MyTorrents.Runtime", show.Runtime.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.Certification", show.Certification); GUIPropertyManager.SetProperty("#MyTorrents.Rating", show.Rating); } } else if (!string.IsNullOrEmpty(selectedmatch.imdb)) { TraktMovie movie = TraktAPI.MovieOverview("tt" + Convert.ToInt32(selectedmatch.imdb).ToString("0000000")); if (!string.IsNullOrEmpty(movie.Title)) { GUIPropertyManager.SetProperty("#MyTorrents.Backdrop", movie.Images.Fanart); GUIPropertyManager.SetProperty("#MyTorrents.Poster", movie.Images.Poster); GUIPropertyManager.SetProperty("#MyTorrents.Title", movie.Title); GUIPropertyManager.SetProperty("#MyTorrents.Year", movie.Year); GUIPropertyManager.SetProperty("#MyTorrents.Summary", movie.Overview); GUIPropertyManager.SetProperty("#MyTorrents.Runtime", movie.Runtime.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.Certification", movie.Certification); GUIPropertyManager.SetProperty("#MyTorrents.Rating", movie.Rating); GUIPropertyManager.SetProperty("#MyTorrents.Trailer", movie.Trailer); } } else { GUIPropertyManager.SetProperty("#MyTorrents.Backdrop", ""); GUIPropertyManager.SetProperty("#MyTorrents.Poster", ""); GUIPropertyManager.SetProperty("#MyTorrents.Title", ""); GUIPropertyManager.SetProperty("#MyTorrents.Year", ""); GUIPropertyManager.SetProperty("#MyTorrents.Summary", ""); GUIPropertyManager.SetProperty("#MyTorrents.Runtime", ""); GUIPropertyManager.SetProperty("#MyTorrents.Certification", ""); GUIPropertyManager.SetProperty("#MyTorrents.Rating", ""); } }) { IsBackground = true, Name = "MyTorrent Backdrop Lookup" }; backdrop.Start(); }
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 static void SetExifProperties(this ExifMetadata.Metadata metadata) { string full = string.Empty; Type type = typeof(ExifMetadata.Metadata); foreach (FieldInfo prop in type.GetFields()) { string value = string.Empty; string caption = prop.Name.ToCaption() ?? prop.Name; switch (prop.Name) { case nameof(ExifMetadata.Metadata.ImageDimensions): value = metadata.ImageDimensionsAsString(); break; case nameof(ExifMetadata.Metadata.Resolution): value = metadata.ResolutionAsString(); break; case nameof(ExifMetadata.Metadata.Location): if (metadata.Location != null) { string latitude = metadata.Location.Latitude.ToLatitudeString() ?? string.Empty; string longitude = metadata.Location.Longitude.ToLongitudeString() ?? string.Empty; if (!string.IsNullOrEmpty(latitude) && !string.IsNullOrEmpty(longitude)) { value = latitude + " / " + longitude; } } break; case nameof(ExifMetadata.Metadata.Altitude): if (metadata.Location != null) { value = metadata.Altitude.ToAltitudeString(); } break; case nameof(ExifMetadata.Metadata.HDR): GUIPropertyManager.SetProperty("#pictures.exif.is" + prop.Name.ToLower(), metadata.HDR ? "true" : "false"); continue; default: value = ((ExifMetadata.MetadataItem)prop.GetValue(metadata)).DisplayValue ?? string.Empty; break; } if (!string.IsNullOrEmpty(value)) { value = value.ToValue() ?? value; full = full + caption + ": " + value + "\n"; } GUIPropertyManager.SetProperty("#pictures.exif." + prop.Name.ToLower(), value); } GUIPropertyManager.SetProperty("#pictures.exif.full", full); GUIPropertyManager.SetProperty("#pictures.haveexif", metadata.IsEmpty() ? "false" : "true"); }
protected override void OnPageDestroy(int newWindowId) { if (File.Exists(_histogramFilename)) { File.Delete(_histogramFilename); } ReleaseResources(); GUIPropertyManager.SetProperty("#pictures.exif.picture", String.Empty); base.OnPageDestroy(newWindowId); }
void ResetLatestVideoGuiProperties(int index) { GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.Site", index), string.Empty); GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.SiteIcon", index), string.Empty); GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.Title", index), string.Empty); GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.Aired", index), string.Empty); GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.Duration", index), string.Empty); GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.Thumb", index), string.Empty); GUIPropertyManager.SetProperty(string.Format("#OnlineVideos.LatestVideo{0}.Description", index), string.Empty); }
public override bool Init() { GUIPropertyManager.SetProperty("#Actor.Movies.Progress", string.Empty); using (Profile.Settings xmlreader = new MPSettings()) { _movieInfoBeforePlay = xmlreader.GetValueAsBool("moviedatabase", "movieinfobeforeplay", false); } return(Load(GUIGraphicsContext.GetThemedSkinFile(@"\DialogVideoArtistInfo.xml"))); }
void setMetaData() { if (isAudioPlaying && currentMeta != null) { GUIPropertyManager.SetProperty("#Play.Current.Title", currentMeta.Track); GUIPropertyManager.SetProperty("#Play.Current.Album", currentMeta.Album); GUIPropertyManager.SetProperty("#Play.Current.Artist", currentMeta.Artist); GUIPropertyManager.SetProperty("#Play.Current.Genre", currentMeta.Genre); } }
protected override void OnPageLoad() { LoadSettings(); if (lblHostName != null) { lblHostName.Label = _hostName; } GUIPropertyManager.SetProperty("#TV.setup.hostname", _hostName); base.OnPageLoad(); }
protected void ClearPlayProps() { GUIPropertyManager.SetProperty("#Play.Current.Thumb", " "); GUIPropertyManager.SetProperty("#Play.Current.Artist", " "); GUIPropertyManager.SetProperty("#Play.Current.Title", " "); GUIPropertyManager.SetProperty("#Play.Current.Track", " "); GUIPropertyManager.SetProperty("#Play.Current.Album", " "); GUIPropertyManager.SetProperty("#Play.Current.Year", " "); GUIPropertyManager.SetProperty("#Play.Current.Rating", "0"); }
private void UpdateCountDown(double timeElapsed) { int timeLeft = _timeOutInSeconds - (int)Math.Truncate(timeElapsed); if (timeLeft != _timeLeft) { _timeLeft = timeLeft; GUIPropertyManager.SetProperty("#countdownseconds", _timeLeft.ToString()); } }
public void TranslateSkin() { Type transType = typeof(Translator); FieldInfo[] fieldInfos = transType.GetFields(BindingFlags.Public | BindingFlags.Instance); foreach (FieldInfo fi in fieldInfos) { GUIPropertyManager.SetProperty("#Emulators2.Label." + fi.Name, (string)fi.GetValue(this)); } }
private void Update() { if (m_pTexture != null) { m_pTexture.Dispose(); } int iRotate = PictureDatabase.GetRotation(FileName); m_pTexture = Util.Picture.Load(FileName, iRotate, 1024, 1024, true, false, out m_iTextureWidth, out m_iTextureHeight); lblCameraModel.Label = string.Empty; lblDateTakenLabel.Label = string.Empty; lblEquipmentMake.Label = string.Empty; lblExposureCompensation.Label = string.Empty; lblExposureTime.Label = string.Empty; lblFlash.Label = string.Empty; lblFstop.Label = string.Empty; lblImgDimensions.Label = string.Empty; lblImgTitle.Label = string.Empty; lblMeteringMode.Label = string.Empty; lblResolutions.Label = string.Empty; lblShutterSpeed.Label = string.Empty; lblViewComments.Label = string.Empty; using (ExifMetadata extractor = new ExifMetadata()) { ExifMetadata.Metadata metaData = extractor.GetExifMetadata(FileName); lblCameraModel.Label = metaData.CameraModel.DisplayValue; lblDateTakenLabel.Label = metaData.DatePictureTaken.DisplayValue; lblEquipmentMake.Label = metaData.EquipmentMake.DisplayValue; lblExposureCompensation.Label = metaData.ExposureCompensation.DisplayValue; lblExposureTime.Label = metaData.ExposureTime.DisplayValue; lblFlash.Label = metaData.Flash.DisplayValue; lblFstop.Label = metaData.Fstop.DisplayValue; lblImgDimensions.Label = metaData.ImageDimensions.DisplayValue; lblImgTitle.Label = Path.GetFileNameWithoutExtension(FileName); lblMeteringMode.Label = metaData.MeteringMode.DisplayValue; lblResolutions.Label = metaData.Resolution.DisplayValue; lblShutterSpeed.Label = metaData.ShutterSpeed.DisplayValue; lblViewComments.Label = metaData.ViewerComments.DisplayValue; imgPicture.IsVisible = false; } if (File.Exists(FileName)) { GUIPropertyManager.SetProperty("#selectedthumb", FileName); } else { GUIPropertyManager.SetProperty("#selectedthumb", string.Empty); } }
private void SetProperties(UpcomingProgram upcoming, ScheduleSummary schedule) { string guiPropertyPrefix = this._channelType == ChannelType.Television ? "#TV" : "#Radio"; if (schedule != null) { GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Channel", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Title", schedule.Name); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Genre", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Time", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Description", " "); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.thumb", "defaultFolderBig.png"); } else if (upcoming != null) { GuideProgram guideProgram = upcoming.GuideProgramId.HasValue ? Proxies.GuideService.GetProgramById(upcoming.GuideProgramId.Value).Result : null; string strTime = string.Format("{0} {1} - {2}", Utility.GetShortDayDateString(upcoming.StartTime), upcoming.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat), upcoming.StopTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat)); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Channel", upcoming.Channel.DisplayName); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Title", upcoming.Title); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Genre", upcoming.Category); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Time", strTime); string description = String.Empty; if (guideProgram != null) { description = guideProgram.CreateCombinedDescription(true); } GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Description", description); string logo = Utility.GetLogoImage(upcoming.Channel.ChannelId, upcoming.Channel.DisplayName); if (!string.IsNullOrEmpty(logo)) { GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.thumb", logo); } else { GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.thumb", "defaultVideoBig.png"); } } else { GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Channel", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Title", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Genre", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Time", String.Empty); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.Description", " "); GUIPropertyManager.SetProperty(guiPropertyPrefix + ".Upcoming.thumb", String.Empty); } }
private void DisplayTorrents(List <Torrent> TorrentsAll) { long downloadSpeed = 0; int downs = 0; long uploadSpeed = 0; long seeding = 0; double avgProgress = 0.0; int unfinished = 0; int ActiveTorrents = 0; foreach (Torrent torrent in TorrentsAll) { if (torrent.Started()) { if (torrent.DownloadSpeed > 0 || torrent.UploadSpeed > 0) { ActiveTorrents++; } downloadSpeed += torrent.DownloadSpeed; uploadSpeed += torrent.UploadSpeed; if (torrent.Progress >= 100) { //only seeding seeding = seeding + 1; } else { downs++; } } if (torrent.Progress < 100.0) { avgProgress += torrent.Progress; unfinished += 1; } } UpdateScreen(); GUIPropertyManager.SetProperty("#MyTorrents.IsConnected", TorrentEngine.Instance().IsConnected.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.CombinedDownloadSpeed", UnitConvert.TransferSpeedToString(downloadSpeed)); GUIPropertyManager.SetProperty("#MyTorrents.CombinedUploadSpeed", UnitConvert.TransferSpeedToString(uploadSpeed)); GUIPropertyManager.SetProperty("#MyTorrents.Downloads.Count", string.Format("{0}", downs)); GUIPropertyManager.SetProperty("#MyTorrents.Uploads.Count", string.Format("{0}", seeding)); GUIPropertyManager.SetProperty("#MyTorrents.Active.Count", string.Format("{0}", ActiveTorrents)); //GUIPropertyManager.SetProperty("#MyTorrents.Ready.Count", string.Format("{0}", TorrentsAll.Count - TorrentsActive.Count)); //GUIPropertyManager.SetProperty("#MyTorrents.Unfinished.Count", string.Format("{0}", unfinished)); //GUIPropertyManager.SetProperty("#MyTorrents.AverageProgressOfUnfinished", string.Format("{0:F2}", avgProgress / unfinished)); if (Notifier.Instance() != null && Notifier.Instance().IsNotificationBarAvailable() && (_config.Notify)) { Notifier.Instance().ChangeText(); } }
protected override void OnPageLoad() { base.OnPageLoad(); _mpRestartNeeded = false; _restartPlayerNeeded = false; LoadSettings(false); _isSingleSeat = Utility.IsThisASingleSeatSetup(_serverSettings.ServerName); UpdateButtons(); GUIPropertyManager.SetProperty("#currentmodule", Utility.GetLocalizedText(TextId.ArgusClientSettings)); }
private void LoadDirectory() { GUIControl.ClearControl(GetID, listPriorities.GetID); SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(Schedule)); sb.AddOrderByField(false, "priority"); SqlStatement stmt = sb.GetStatement(true); IList itemlist = ObjectFactory.GetCollection(typeof(Schedule), stmt.Execute()); int total = 0; foreach (Schedule rec in itemlist) { if (rec.IsSerieIsCanceled(rec.StartTime, rec.IdChannel)) { continue; } GUIListItem item = new GUIListItem(); item.Label = String.Format("{0}.{1}", total, rec.ProgramName); item.TVTag = rec; string strLogo = Utils.GetCoverArt(Thumbs.TVChannel, rec.ReferencedChannel().DisplayName); if (string.IsNullOrEmpty(strLogo)) { strLogo = "defaultVideoBig.png"; } TvServer server = new TvServer(); VirtualCard card; if (server.IsRecordingSchedule(rec.IdSchedule, out card)) { if (rec.ScheduleType != (int)ScheduleRecordingType.Once) { item.PinImage = Thumbs.TvRecordingSeriesIcon; } else { item.PinImage = Thumbs.TvRecordingIcon; } } else if (rec.ReferringConflicts().Count > 0) { item.PinImage = Thumbs.TvConflictRecordingIcon; } item.ThumbnailImage = strLogo; item.IconImageBig = strLogo; item.IconImage = strLogo; listPriorities.Add(item); total++; } //set object count label GUIPropertyManager.SetProperty("#itemcount", Utils.GetObjectCountLabel(total)); GUIControl.SelectItemControl(GetID, listPriorities.GetID, m_iSelectedItem); }
protected override void OnPageLoad() { base.OnPageLoad(); GUIPropertyManager.SetProperty("#ptg_header", "Upcoming Broadcasts"); GUIPropertyManager.SetProperty("#description", " "); if (imStars != null) { imStars.SetFileName(String.Empty); } LoadSettings(); }
public static void Play() { // We have the Station Name in there to retrieve the correct Coverart for the station in the Vis Window GUIPropertyManager.RemovePlayerProperties(); GUIPropertyManager.SetProperty("#Play.Current.ArtistThumb", _currentChannel.DisplayName); GUIPropertyManager.SetProperty("#Play.Current.Album", _currentChannel.DisplayName); if ((_currentChannel.IsWebstream()) || (_currentChannel.CurrentProgram == null || _currentChannel.NextProgram == null || string.IsNullOrEmpty(_currentChannel.CurrentProgram.Title) || string.IsNullOrEmpty(_currentChannel.NextProgram.Title))) { GUIPropertyManager.SetProperty("#Play.Current.Title", _currentChannel.DisplayName); // No EPG GUIPropertyManager.SetProperty("#Play.Next.Title", string.Empty); } else { GUIPropertyManager.SetProperty("#Play.Current.Title", _currentChannel.CurrentProgram.Title); GUIPropertyManager.SetProperty("#Play.Next.Title", _currentChannel.NextProgram.Title); } string strLogo = Utils.GetCoverArt(Thumbs.Radio, _currentChannel.DisplayName); if (string.IsNullOrEmpty(strLogo)) { strLogo = "defaultMyRadioBig.png"; } GUIPropertyManager.SetProperty("#Play.Current.Thumb", strLogo); if (g_Player.Playing && !_currentChannel.IsWebstream()) { if (!g_Player.IsTimeShifting || (g_Player.IsTimeShifting && _currentChannel.IsWebstream())) { g_Player.Stop(); } } if (_currentChannel.IsWebstream()) { g_Player.PlayAudioStream(GetPlayPath(_currentChannel)); GUIPropertyManager.SetProperty("#Play.Current.Title", _currentChannel.DisplayName); } else { if (g_Player.IsRadio && g_Player.Playing) { Channel currentlyPlaying = TVHome.Navigator.Channel; if (currentlyPlaying != null && currentlyPlaying.IdChannel == _currentChannel.IdChannel) { return; } } TVHome.ViewChannelAndCheck(_currentChannel); } }
public void ResetProperties() { GUIPropertyManager.SetProperty("#Actor.Name", string.Empty); GUIPropertyManager.SetProperty("#Actor.DateOfBirth", string.Empty); GUIPropertyManager.SetProperty("#Actor.PlaceOfBirth", string.Empty); GUIPropertyManager.SetProperty("#Actor.LastUpdate", string.Empty); GUIPropertyManager.SetProperty("#Actor.DateOfDeath", string.Empty); GUIPropertyManager.SetProperty("#Actor.PlaceOfDeath", string.Empty); GUIPropertyManager.SetProperty("#Actor.Biography", string.Empty); GUIPropertyManager.SetProperty("#hideActorinfo", "true"); }
protected override void OnPageLoad() { base.OnPageLoad(); GUIPropertyManager.SetProperty("#ptg_header", "Edit"); ///BAV: Load Data if (_keywordID > 0) { } InitToggleButtons(); UpdateWindow(); }
public void ShowTorrentDetails() { lock (UpdateLocker) { FileList.ListItems = ViewDetails.GetTorrentDetails(torrentList.SelectedListItem.AlbumInfoTag as Torrent); } torrentList.Visible = false; GUIPropertyManager.SetProperty("#MyTorrents.TorrentDetails.Visible", "yes"); GiveFocus(FileList); }
private void LoadDirectory() { int total = 0; GUIWaitCursor.Show(); GUIControl.ClearControl(GetID, listConflicts.GetID); if (selectedItem == null) { IList <Conflict> conflictsList = Conflict.ListAll(); foreach (Conflict conflict in conflictsList) { Schedule schedule = Schedule.Retrieve(conflict.IdSchedule); Schedule conflictingSchedule = Schedule.Retrieve(conflict.IdConflictingSchedule); GUIListItem item = Schedule2ListItem(schedule); item.MusicTag = conflictingSchedule; item.Label3 = conflictingSchedule.ProgramName; item.IsFolder = true; listConflicts.Add(item); total++; } } else { Schedule schedule = selectedItem.TVTag as Schedule; Schedule conflictingSchedule = selectedItem.MusicTag as Schedule; GUIListItem item = new GUIListItem(); item.Label = ".."; item.IsFolder = true; listConflicts.Add(item); total++; item = Schedule2ListItem(schedule); listConflicts.Add(item); total++; item = Schedule2ListItem(conflictingSchedule); listConflicts.Add(item); SetLabels(); total++; } //set object count label GUIPropertyManager.SetProperty("#itemcount", Utils.GetObjectCountLabel(total)); GUIWaitCursor.Hide(); if (listConflicts.Count == 0) { GUIWindowManager.ShowPreviousWindow(); } }
private void UpdateButtons() { GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_BTNREFRESH, GUILocalizeStrings.Get(184)); //Refresh GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LABELCHANNEL, m_strDescription); //Channel name label GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(9) + @"/" + m_strSiteName); int posX = m_pSiteImage.XPosition; int posY = m_pSiteImage.YPosition; m_pSiteImage.SetPosition(posX, posY); m_pSiteImage.ColourDiffuse = 0xffffffff; m_pSiteImage.SetFileName(m_strSiteIcon); // m_pSiteImage.Width = m_pSiteImage.TextureWidth; // m_pSiteImage.Height = m_pSiteImage.TextureHeight; GUIControl.ClearControl(GetID, (int)Controls.CONTROL_LIST); int iTotalItems = 0; foreach (feed_details feed in m_feed_details) { if (feed.m_title == "" && feed.m_description == "") { // Skip this empty item continue; } GUIListItem item = new GUIListItem(); item.Label = feed.m_title; item.IsFolder = false; item.MusicTag = feed; item.ThumbnailImage = ""; item.IconImage = "defaultMyNews.png"; GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST, item); iTotalItems++; } //set object count label GUIPropertyManager.SetProperty("#itemcount", Util.Utils.GetObjectCountLabel(iTotalItems)); GUIControl.FocusControl(GetID, (int)Controls.CONTROL_LIST); GUIListItem selecteditem = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); if (selecteditem != null) { GUIPropertyManager.SetProperty("#selecteditem", selecteditem.Label); } GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_STORYTEXT, m_feed_details[0].m_description); }
void playBeginWorker_DoWork(object sender, DoWorkEventArgs e) { try { GUIPropertyManager.SetProperty("#Play.Current.Artist", GUIPropertyManager.GetProperty("#Youtube.fm.NowPlaying.Artist.Name")); GUIPropertyManager.SetProperty("#Play.Current.Title", GUIPropertyManager.GetProperty("#Youtube.fm.NowPlaying.Video.Title")); if (Youtube2MP.NowPlayingEntry.Media != null) { GUIPropertyManager.SetProperty("#Play.Current.Thumb", Youtube2MP.GetLocalImageFileName( GetBestUrl(Youtube2MP.NowPlayingEntry.Media.Thumbnails))); } if (Youtube2MP.NowPlayingEntry.Rating != null) { GUIPropertyManager.SetProperty("#Play.Current.Rating", (Youtube2MP.NowPlayingEntry.Rating.Average * 2).ToString()); } SetLabels(Youtube2MP.NowPlayingEntry, "NowPlaying"); SetLabels(Youtube2MP.NextPlayingEntry, "Next"); DatabaseProvider.InstanInstance.SavePlayData(Youtube2MP.NowPlayingEntry, DateTime.Now); ArtistManager.Instance.SetSkinProperties(Youtube2MP.NowPlayingEntry, "NowPlaying", true, true); ArtistManager.Instance.SetSkinProperties(Youtube2MP.NextPlayingEntry, "Next", true, true); relatated.Clear(); similar.Clear(); if (GUIWindowManager.ActiveWindow == (int)GetID) { if (listControl != null) { GUIControl.ClearControl(GetID, listControl.GetID); } if (listsimilar != null) { GUIControl.ClearControl(GetID, listsimilar.GetID); } } if (Youtube2MP._settings.LastFmNowPlay) { Youtube2MP.LastFmProfile.NowPlaying(Youtube2MP.NowPlayingEntry); } infoTimer.Enabled = true; _lastFmTimer.Stop(); _lastFmTimer.Start(); Track.TrackPlay(); } catch (Exception exception) { Log.Error(exception); } }
protected void ClearPlayProps() { GUIPropertyManager.SetProperty("#Play.Current.Thumb", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.Artist", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.Title", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.Track", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.Album", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.Year", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.BitRate", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.FileType", string.Empty); GUIPropertyManager.SetProperty("#Play.Current.Rating", "0"); }
private void writeProperty() { if (_active && _property != null && _identifier != null) { GUIPropertyManager.SetProperty(_property, _identifier); } else if (_property != null) { GUIPropertyManager.SetProperty(_property, "-"); } }