Ejemplo n.º 1
0
        private void LoadSongListFromResource()
        {
            SongList = StateConfiguration.SongList;

            var songList = new SongList(SongController.GetSongs(ResourceConfiguration).Select(s => SongListItem.CreateInstance(s)));

            if (SongList != null)
            {
                foreach (var song in songList)
                {
                    var found = SongList.FirstOrDefault(s => s.AreSame(song));
                    if (found != null)
                    {
                        song.Selected = found.Selected;
                    }
                }
            }
            SongList = songList;
            StateConfiguration.SongList = SongList;
            StateConfiguration.Save();
        }