public QueueSong GetQueueSongByIndexId(int id) { return(BackgroundQueueHelper.GetQueueSong(p => p.Id == id)); }
public QueueSong PrevId(int id) { return(IsShuffle ? BackgroundQueueHelper.GetQueueSong(p => p.ShufflePrevId == id) : BackgroundQueueHelper.GetQueueSong(p => p.PrevId == id)); }
private void LoadAndSetTile() { QueueSong track = CurrentTrack; if (track == null) { TileUpdateManager.CreateTileUpdaterForApplication("App").Clear(); return; } var artworkUrl = AppConstant.MissingArtworkAppPath; try { artworkUrl = BackgroundQueueHelper.IsValidPathForAlbum(track.Song.AlbumId) ? AppConstant.LocalStorageAppPath + string.Format(AppConstant.ArtworkPath, track.Song.AlbumId) : AppConstant.MissingArtworkAppPath; } catch { artworkUrl = AppConstant.MissingArtworkAppPath; } string trackName = track.Song.Name; string artistName = track.Song.ArtistName; string tileXmlString = "<tile>" + "<visual branding='nameAndLogo'>" + "<binding template='TileSmall' hint-textStacking='top'>" + "<image src='" + artworkUrl + "'" + " placement='peek'/>" + "<text hint-wrap='true' hint-maxLines='2' hint-style='body' hint-align='left'>" + artistName + "</text>" + "</binding>" + "<binding template='TileMedium' hint-textStacking='top'>" + "<image src='" + artworkUrl + "'" + " placement='peek'/>" + "<text hint-style='base' hint-align='left'>" + artistName + "</text>" + "<text hint-style='captionSubtle' hint-align='left'>" + trackName + "</text>" + "</binding>" + "<binding template='TileWide' hint-textStacking='left'>" + "<image src='" + artworkUrl + "'" + " placement='peek'/>" + "<text hint-style='base' hint-align='left'>" + artistName + "</text>" + "<text hint-style='captionSubtle' hint-align='left'>" + trackName + "</text>" + "</binding>" + "<binding template='TileLarge' hint-textStacking='left'>" + "<image src='" + artworkUrl + "'" + " placement='peek'/>" + "<text hint-style='base' hint-align='left'>" + artistName + "</text>" + "<text hint-style='captionSubtle' hint-align='left'>" + trackName + "</text>" + "</binding>" + "</visual>" + "</tile>"; Windows.Data.Xml.Dom.XmlDocument toastDOM = new Windows.Data.Xml.Dom.XmlDocument(); toastDOM.LoadXml(tileXmlString); try { TileNotification toast = new TileNotification(toastDOM); TileUpdateManager.CreateTileUpdaterForApplication("App").Update(toast); } catch (Exception) { } }