left await actions out of FB core, but put back the form invoke things

This commit is contained in:
Don Archer 2016-08-06 08:51:23 -07:00
parent bd549b584c
commit cdce3825bd
2 changed files with 4 additions and 7 deletions

View File

@ -37,7 +37,7 @@ namespace KaraokePlayer.Classes
public void SetState(PlayerState state) public void SetState(PlayerState state)
{ {
_state = state; _state = state;
_client.Set(StatePath, "playing"); _client.SetAsync(StatePath, "playing");
} }
public FirebaseController(string clientId, ControllerStateChangedEventHandler stateChanged, ControllerSongChangedEventHandler songChanged) public FirebaseController(string clientId, ControllerStateChangedEventHandler stateChanged, ControllerSongChangedEventHandler songChanged)

View File

@ -38,16 +38,13 @@ namespace KaraokePlayer
switch (args.State) switch (args.State)
{ {
case PlayerState.playing: case PlayerState.playing:
//this.Invoke(new Action(() => { player.play(); })); this.Invoke(new Action(() => { player.play(); }));
player.play();
break; break;
case PlayerState.paused: case PlayerState.paused:
//this.Invoke(new Action(() => { player.pause(); })); this.Invoke(new Action(() => { player.pause(); }));
player.pause();
break; break;
case PlayerState.stopped: case PlayerState.stopped:
//this.Invoke(new Action(() => { player.stop(); })); this.Invoke(new Action(() => { player.stop(); }));
player.stop();
break; break;
} }
}, },