public void OnSuccess(object response) { Deployment.Current.Dispatcher.BeginInvoke(() => { User user = (User)response; { if (flag) { User.Profile profile = new User.Profile(user); profile.SetLine1("0"); // for wins profile.SetLine2("0"); // for games played flag = false; userService.CreateOrUpdateProfile(user, this); } String jsonResponse = user.ToString(); Global.localUsername = user.GetUserName(); Global.email = user.GetEmail(); Global.password = pass.Text; NavigationService.Navigate(new Uri("/transition.xaml", UriKind.Relative)); } }); }
public void OnSuccess(object response) { Deployment.Current.Dispatcher.BeginInvoke(() => { User user = (User)response; { if (flag) { User.Profile profile = new User.Profile(user); profile.SetLine1("0"); // for wins profile.SetLine2("0"); // for games played flag = false; userService.CreateOrUpdateProfile(user, this); } String jsonResponse = user.ToString(); Global.localUsername = user.GetUserName(); Global.email = user.GetEmail(); Global.password = pass.Text; NavigationService.Navigate(new Uri("/transition.xaml", UriKind.Relative)); } }); }
public void OnSuccess(object response) { User user = (User)response; if (flag) { win = user.GetProfile().GetLine1(); games = user.GetProfile().GetLine2(); games = Convert.ToInt32((games) + 1) + ""; User.Profile profile = new User.Profile(user); profile.SetLine2(games); if (Global.p1Score > Global.p2Score) { win = (Convert.ToInt32(win) + 1) + ""; profile.SetLine1(win); } // "wins is : " + user.GetProfile().GetLine1(); // games playes is user.GetProfile().SetLine2(); flag = false; userService.CreateOrUpdateProfile(user, this); } }
public void OnSuccess(object response) { User user = (User)response; if (flag) { win = user.GetProfile().GetLine1(); games = user.GetProfile().GetLine2(); games = Convert.ToInt32((games) + 1) + ""; User.Profile profile = new User.Profile(user); profile.SetLine2(games); if (Global.p1Score > Global.p2Score) { win = (Convert.ToInt32(win) + 1) + ""; profile.SetLine1(win); } // "wins is : " + user.GetProfile().GetLine1(); // games playes is user.GetProfile().SetLine2(); flag = false; userService.CreateOrUpdateProfile(user, this); } }