using System.Threading.Tasks; using Aurora.Design.Views.Party.NewPartyDialog; using Xamarin.Forms; using Aurora.Services.Server; using Aurora.Services.EventManager; using Aurora.Services.Settings; namespace Aurora.Design.Views.Party { public class HostPartyViewModel : BasePartyViewModel { private IServerService _serverService; private IEventManager _eventManager; public HostPartyViewModel( ISettingsService settingsService, IServerService serverService, IEventManager eventManager ): base(settingsService) { this._serverService = serverService; this._eventManager = eventManager; } #region Properties /// /// Public property for playing media command /// /// public Command PlayCommand { get; private set; } /// /// Public property for leave party command /// /// public Command LeavePartyCommand { get; private set; } #endregion Properties /// /// Called by framework when view becomes active /// /// public override Task OnActive() { return Task.FromResult(null); } /// /// Called by framework when view becomes inactive /// /// public override Task OnInactive() { return Task.FromResult(null); } private async void OnHostCommandExecute() { } private bool CanHostCommandExecute() { return true; } private async void OnLeavePartyCommandExecute() { } private bool CanLeavePartyCommandExecute() { return true; } public override void OnPlayButtonCommandExecute() { } public override bool CanPlayButtonCommandExecute() { return this.State == PartyStateV2.Hosting; } public override bool CanNextButtonCommandExecute() { return this.State == PartyStateV2.Hosting; } public override bool CanPreviousButtonCommandExecute() { return this.State == PartyStateV2.Hosting; } /// /// On double click execute, fire media playing event /// public void OnDoubleClickCommandExecute() { } public bool CanDoubleClickCommandExecute() { return this.State == PartyStateV2.Hosting; } } }