Hooked up view with play button

Set up data structures for holding and playing music
This commit is contained in:
watsonb8
2019-05-22 10:30:41 -04:00
parent 65d56a838c
commit a4276a0d5d
7 changed files with 88 additions and 31 deletions

View File

@ -1,6 +1,8 @@
using System.Collections.ObjectModel;
using Aurora.Backend.Models;
using Aurora.Backend.Services;
using Aurora.Backend.Services.PlayerService;
using Xamarin.Forms;
namespace Aurora.Frontend.Views.Songs
{
@ -16,6 +18,7 @@ namespace Aurora.Frontend.Views.Songs
public SongsViewModel()
{
_songsList = new ObservableCollection<BaseSong>();
PlayCommand = new Command(PlayExecute);
Initialize();
}
@ -25,29 +28,17 @@ namespace Aurora.Frontend.Views.Songs
public ObservableCollection<BaseSong> SongsList
{
get { return _songsList; }
set
{
if (value != _songsList)
{
_songsList = value;
OnPropertyChanged("SongList");
}
}
set { SetProperty(ref _songsList, value); }
}
public BaseSong SelectedSong
{
get { return _selectedSong; }
set
{
if (value != _selectedSong)
{
_selectedSong = value;
OnPropertyChanged("SelectedSong");
}
}
set { SetProperty(ref _selectedSong, value); }
}
public Command PlayCommand { get; private set; }
#endregion Properties
#region Methods