/// <summary> /// Gets Steam ID from settings. /// </summary> /// <returns></returns> private string GetSteamId() { // TODO: Move to Utils? var steamId = (string)ApplicationData.Current.RoamingSettings.Values["SteamId"]; if (string.IsNullOrEmpty(steamId)) { var profileUrl = (string)ApplicationData.Current.RoamingSettings.Values["ProfileUrl"]; if (!string.IsNullOrEmpty(profileUrl)) { // Have to extract ID from profile URL steamId = DependencyHelper.Resolve <UserService>().GetSteamId(profileUrl).Result; // Save ID ApplicationData.Current.RoamingSettings.Values["SteamId"] = steamId; } } return(steamId); }