/// <summary> /// Show the user info /// </summary> /// <param name="loginServiceToken">Login service token</param> private void ShowUserInfo(string loginServiceToken) { GetUserInfoServiceResponse response = null; // Checking token if (string.IsNullOrWhiteSpace(loginServiceToken)) { ErrorMsg = UNKNOWN_ERROR; log.Fatal("Unknown error. Token was not present in service response."); return; } // Calling GetUserInfo Service log.DebugFormat("Calling the getUserInfo service with token '{0}'", loginServiceToken); try { response = HTTPRequest.MakeRequest <GetUserInfoServiceResponse>(getUserDataURL, token: loginServiceToken); } catch (Exception ex) { ErrorMsg = CONNECTION_ERROR; log.Fatal("Exception calling getUserInfo service", ex); return; } log.DebugFormat("GetUserInfo service response. Status: {0}", response.Status); if (ProcessServiceResponse(response)) { // Checking user data if (response.ServiceData == null || response.ServiceData.UserData == null) { ErrorMsg = UNKNOWN_ERROR; log.Fatal("Unknown error. User data was not present in service response."); return; } UserInfoWindow win = new UserInfoWindow(response.ServiceData.UserData); win.ShowDialog(); } }
public void Execute(object parameter) { UserInfoWindow userInfoWindow = new UserInfoWindow(); userInfoWindow.ShowDialog(); }