diff --git a/YJMPD-UWP/Model/ApiHandler.cs b/YJMPD-UWP/Model/ApiHandler.cs index fad2095..e5858fd 100644 --- a/YJMPD-UWP/Model/ApiHandler.cs +++ b/YJMPD-UWP/Model/ApiHandler.cs @@ -32,10 +32,10 @@ namespace YJMPD_UWP.Model public void HandleMessage(JObject o) { - Debug.WriteLine("Reached HandleMessage in API"); + Debug.WriteLine(o.ToString()); Command c = (Command)Enum.Parse(typeof(Command), o["command"].ToString()); - switch(c) + switch (c) { case Command.GameFound: GameFound(); @@ -44,6 +44,13 @@ namespace YJMPD_UWP.Model Debug.WriteLine("Played joined"); PlayerJoined(o[Command.PlayerJoined.ToString()].ToString()); break; + case Command.Picture: + if (o["selected"].ToObject() == true) + { + Debug.WriteLine("Selected player taking picture"); + App.Game.Selected = true; + } + break; default: //Do nothing break; diff --git a/YJMPD-UWP/Model/GameHandler.cs b/YJMPD-UWP/Model/GameHandler.cs index 67db715..e3abf45 100644 --- a/YJMPD-UWP/Model/GameHandler.cs +++ b/YJMPD-UWP/Model/GameHandler.cs @@ -24,7 +24,7 @@ namespace YJMPD_UWP.Model public List Players { get; private set; } - public bool Selected { get; private set; } + public bool Selected { get; set; } private void UpdateGameStatus(GameStatus status) { diff --git a/YJMPD-UWP/Model/NetworkHandler.cs b/YJMPD-UWP/Model/NetworkHandler.cs index f5a4a04..4991444 100644 --- a/YJMPD-UWP/Model/NetworkHandler.cs +++ b/YJMPD-UWP/Model/NetworkHandler.cs @@ -112,7 +112,6 @@ namespace YJMPD_UWP.Model public void HandleMessage(string data) { - Debug.WriteLine(data); JObject o = JObject.Parse(data); App.Api.HandleMessage(o);