예제 #1
0
        private async void RefreshButton_Click_1(object sender, RoutedEventArgs e)
        {
            progbar.Visibility = Visibility.Visible;
            string resp2 = await Twitter.Get_tweets("#NowPlaying");

            JObject jo2 = JObject.Parse(resp2);

            //try{
            for (int i = 0; i < 19; i++)
            {
                TweetViewModel tvm = new TweetViewModel();
                tvm.handle = (string)jo2["results"][i]["from_user"];
                tvm.tweet  = (string)jo2["results"][i]["text"];
                tvm.dp     = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri((string)jo2["results"][i]["profile_image_url"], UriKind.Absolute));
                ListTweetModel.Add(tvm);
            }
            itemListView2.ItemsSource = ListTweetModel;

            progbar.Visibility = Visibility.Collapsed;
        }
예제 #2
0
        private async void RefreshButton_Click_1(object sender, RoutedEventArgs e)
        {
            progbar.Visibility = Visibility.Visible;
            string resp2 = await Twitter.Get_tweets("#NowPlaying");
            JObject jo2 = JObject.Parse(resp2);
            //try{
            for (int i = 0; i < 19; i++)
            {
                TweetViewModel tvm = new TweetViewModel();
                tvm.handle = (string)jo2["results"][i]["from_user"];
                tvm.tweet = (string)jo2["results"][i]["text"];
                tvm.dp = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri((string)jo2["results"][i]["profile_image_url"], UriKind.Absolute));
                ListTweetModel.Add(tvm);
            }
            itemListView2.ItemsSource = ListTweetModel;

            progbar.Visibility = Visibility.Collapsed;

        }