Exemple #1
0
        public dynamic Json(JsonUser jsonUser)
        {
            UserStats userStats      = JsonConvert.DeserializeObject <UserStats>(jsonUser.JsonU);
            JObject   UserAttributes = JObject.Parse(jsonUser.JsonU);

            UserName       = UserAttributes.SelectToken("Name").ToString();
            Countfollowers = (int)UserAttributes.SelectToken("FollowersCount");
            ScreenName     = UserAttributes.SelectToken("ScreenName").ToString();
            CountFavorites = (int)UserAttributes.SelectToken("FavouritesCount");
            return(UserAttributes);
        }
Exemple #2
0
        public static void ProfileStats()
        {
            Account  account  = new Account();
            JsonUser jsonUser = new JsonUser();
            Profile  profile  = new Profile();

            jsonUser.JsonU = account.SetJson();
            profile.Json(jsonUser);
            ((MainWindow)System.Windows.Application.Current.MainWindow).lblFollowersCalc.Content  = profile.Followers().ToString();
            ((MainWindow)System.Windows.Application.Current.MainWindow).lblFavoritesCalc.Content  = profile.Favorites().ToString();
            ((MainWindow)System.Windows.Application.Current.MainWindow).lblScreenNameCalc.Content = profile.ScrnName().ToString();
            ((MainWindow)System.Windows.Application.Current.MainWindow).lblNameCalc.Content       = profile.Name().ToString();
        }