using System.Collections.ObjectModel; using Aurora.Backend.Models; using Aurora.Backend.Services; namespace Aurora.Frontend.Views.Songs { public class SongsViewModel : BaseViewModel { #region Fields private ObservableCollection _songsList; private BaseSong _selectedSong; #endregion Fields #region Constructor public SongsViewModel() { _songsList = new ObservableCollection(); Initialize(); } #endregion Constructor #region Properties public ObservableCollection SongsList { get { return _songsList; } set { if (value != _songsList) { _songsList = value; OnPropertyChanged("SongList"); } } } public BaseSong SelectedSong { get { return _selectedSong; } set { if (value != _selectedSong) { _selectedSong = value; OnPropertyChanged("SelectedSong"); } } } #endregion Properties #region Methods public void Initialize() { SongsList = LibraryService.Instance.GetLibrary(); } #endregion Methods } }