Cosmetic refactoring
This commit is contained in:
		| @@ -43,15 +43,15 @@ namespace Aurora.Design.Views.Party | ||||
|  | ||||
|             SetState(PartyState.SelectingHost); | ||||
|  | ||||
|             PlayCommand = new Command(OnDoubleClickExecute, CanDoubleClickExecute); | ||||
|             PlayCommand = new Command(OnDoubleClickCommandExecute, CanDoubleClickCommandExecute); | ||||
|  | ||||
|             LeavePartyCommand = new Command(OnLeavePartyExecute, CanLeaveParty); | ||||
|             LeavePartyCommand = new Command(OnLeavePartyCommandExecute, CanLeavePartyCommandExecute); | ||||
|  | ||||
|             _client = ClientService.Instance; | ||||
|  | ||||
|             _client.OnMediaPaused += this.OnMediaPaused; | ||||
|             _client.OnMediaResumed += this.OnMediaResumed; | ||||
|             _client.OnNewMediaPlaying += this.OnNewMediaPlaying; | ||||
|             _client.OnMediaPaused += this.OnRemoteMediaPaused; | ||||
|             _client.OnMediaResumed += this.OnRemoteMediaResumed; | ||||
|             _client.OnNewMediaPlaying += this.OnNewRemoteMediaPlaying; | ||||
|             _client.OnPartyMemberJoined += this.OnPartyMemberJoined; | ||||
|             _client.OnPartyMemberLeft += this.OnPartyMemberLeft; | ||||
|  | ||||
| @@ -152,12 +152,12 @@ namespace Aurora.Design.Views.Party | ||||
|                     { | ||||
|                         case ConnectionType.Host: | ||||
|                             { | ||||
|                                 OnHostExecute(); | ||||
|                                 OnHostCommandExecute(); | ||||
|                                 break; | ||||
|                             } | ||||
|                         case ConnectionType.Join: | ||||
|                             { | ||||
|                                 OnJoinExecute(); | ||||
|                                 OnJoinCommandExecute(); | ||||
|                                 break; | ||||
|                             } | ||||
|                     } | ||||
| @@ -182,7 +182,7 @@ namespace Aurora.Design.Views.Party | ||||
|         /// </summary> | ||||
|         /// <param name="sender"></param> | ||||
|         /// <param name="args"></param> | ||||
|         public void OnMediaPaused(object sender, MediaPausedEventArgs args) | ||||
|         public void OnRemoteMediaPaused(object sender, MediaPausedEventArgs args) | ||||
|         { | ||||
|             StopPlaying(); | ||||
|         } | ||||
| @@ -192,7 +192,7 @@ namespace Aurora.Design.Views.Party | ||||
|         /// </summary> | ||||
|         /// <param name="sender"></param> | ||||
|         /// <param name="args"></param> | ||||
|         public void OnNewMediaPlaying(object sender, NewMediaPlayingEventArgs args) | ||||
|         public void OnNewRemoteMediaPlaying(object sender, NewMediaPlayingEventArgs args) | ||||
|         { | ||||
|             PlayFromBeginning(GetMediaFromQueue(args.Event.Media.Id)); | ||||
|         } | ||||
| @@ -202,7 +202,7 @@ namespace Aurora.Design.Views.Party | ||||
|         /// </summary> | ||||
|         /// <param name="sender"></param> | ||||
|         /// <param name="args"></param> | ||||
|         public void OnMediaResumed(object sender, MediaResumedEventArgs args) | ||||
|         public void OnRemoteMediaResumed(object sender, MediaResumedEventArgs args) | ||||
|         { | ||||
|             PlayResume(); | ||||
|         } | ||||
| @@ -242,7 +242,7 @@ namespace Aurora.Design.Views.Party | ||||
|         #endregion Events | ||||
|  | ||||
|         #region Commands | ||||
|         private async void OnJoinExecute() | ||||
|         private async void OnJoinCommandExecute() | ||||
|         { | ||||
|             SetState(PartyState.Connecting); | ||||
|             _client.Start(_hostname, SettingsService.Instance.DefaultPort.ToString()); | ||||
| @@ -260,12 +260,12 @@ namespace Aurora.Design.Views.Party | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private bool CanJoinExecute() | ||||
|         private bool CanJoinCommandExecute() | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|  | ||||
|         private async void OnHostExecute() | ||||
|         private async void OnHostCommandExecute() | ||||
|         { | ||||
|             //Change state | ||||
|             SetState(PartyState.Connecting); | ||||
| @@ -288,22 +288,22 @@ namespace Aurora.Design.Views.Party | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private bool CanHostExecute() | ||||
|         private bool CanHostCommandExecute() | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|  | ||||
|         private async void OnLeavePartyExecute() | ||||
|         private async void OnLeavePartyCommandExecute() | ||||
|         { | ||||
|             await _client.RemotePartyClient.LeavePartyAsync(new LeavePartyRequest()); | ||||
|         } | ||||
|  | ||||
|         private bool CanLeaveParty() | ||||
|         private bool CanLeavePartyCommandExecute() | ||||
|         { | ||||
|             return (this._state == PartyState.InParty || this._state == PartyState.Hosting) ? true : false; | ||||
|         } | ||||
|  | ||||
|         public override void OnPlayButtonExecute() | ||||
|         public override void OnPlayButtonCommandExecute() | ||||
|         { | ||||
|             if (base.IsPlaying()) | ||||
|             { | ||||
| @@ -329,17 +329,17 @@ namespace Aurora.Design.Views.Party | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public override bool CanPlayButtonExecute() | ||||
|         public override bool CanPlayButtonCommandExecute() | ||||
|         { | ||||
|             return this._state == PartyState.Hosting; | ||||
|         } | ||||
|  | ||||
|         public override bool CanNextButtonExecute() | ||||
|         public override bool CanNextButtonCommandExecute() | ||||
|         { | ||||
|             return this._state == PartyState.Hosting; | ||||
|         } | ||||
|  | ||||
|         public override bool CanPreviousButtonExecute() | ||||
|         public override bool CanPreviousButtonCommandExecute() | ||||
|         { | ||||
|             return this._state == PartyState.Hosting; | ||||
|         } | ||||
| @@ -347,7 +347,7 @@ namespace Aurora.Design.Views.Party | ||||
|         /// <summary> | ||||
|         /// On double click execute, fire media playing event | ||||
|         /// </summary> | ||||
|         public void OnDoubleClickExecute() | ||||
|         public void OnDoubleClickCommandExecute() | ||||
|         { | ||||
|             //Fire Playing event | ||||
|             AudioMetadata meta = _selectedMedia.Metadata as AudioMetadata; | ||||
| @@ -368,7 +368,7 @@ namespace Aurora.Design.Views.Party | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         public bool CanDoubleClickExecute() | ||||
|         public bool CanDoubleClickCommandExecute() | ||||
|         { | ||||
|             return this._state == PartyState.Hosting; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user