public void GetPlayerDetailById(string username) { UserRequestHelper userProfileHelper = new UserRequestHelper(); userProfileHelper.GetUserProfileByUserName(username); userProfileHelper.AsyncUserProfileComplated += (responseData, Ex) => { if (Ex == null) { #region get user profile Player playerDetail = null; if (responseData != null) playerDetail = responseData as Player; if (playerDetail != null) this.SearchUser = playerDetail; if (this.SearchUser.IsFindUser) this.DisplaySearchResult = Visibility.Visible; else this.DisplaySearchResult = Visibility.Collapsed; #endregion } else { string errorMessage = responseData.ToString(); if (!string.IsNullOrEmpty(errorMessage)) new ToastNotifyHelper().ShowCoding4FunToastNotify(errorMessage, "Tip"); } }; }
public void GetPlayerDetailById(string username) { //start processbar _processBarHelper.StartProcessBar(); UserRequestHelper userProfileHelper = new UserRequestHelper(); userProfileHelper.GetUserProfileByUserName(username); userProfileHelper.AsyncUserProfileComplated += (responseData, Ex) => { //end processbar _processBarHelper.EndProcessBar(); if (Ex == null) { #region get user profile Player playerDetail = null; if (responseData != null) playerDetail = responseData as Player; if (playerDetail != null) this.PlayerDetail = playerDetail; #endregion } else { string errorMessage = responseData.ToString(); if (!string.IsNullOrEmpty(errorMessage)) new ToastNotifyHelper().ShowCoding4FunToastNotify(errorMessage, "Tip"); } }; }