using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Aurora.Models.Media;
using Xamarin.Forms;
using Aurora.Design.Views.Main;
namespace Aurora.Design.Views
{
public class BaseViewModel : INotifyPropertyChanged
{
public BaseViewModel()
{
}
#region Player
///
/// Command event handler for player play button
///
public virtual void OnPlayButtonExecute() { }
public virtual bool CanPlayButtonExecute()
{
return true;
}
///
/// Command event handler for player next button
///
public virtual void OnNextButtonExecute() { }
public virtual bool CanNextButtonExecute()
{
return true;
}
///
/// Command event handler for player previous button
///
public virtual void OnPreviousButtonExecute() { }
public virtual bool CanPreviousButtonExecute()
{
return true;
}
///
/// Delegate for interacting with main screen player control
///
///
public SetPlayerDelegate ChangePlayerState { get; set; }
///
/// Delegate for checking if main screen player control is currently playing
///
///
public GetIsPlayingDelegate IsPlaying { get; set; }
public ShowModalDelegate ShowModal { get; set; }
public HideModalDelegate HideModal { get; set; }
#endregion Player
#region Lifecycle
///
/// Called by main screen on view appearing
///
///
///
public virtual Task OnActive() { return Task.FromResult