Esempio n. 1
0
 private void messageResult(TwitterSearchResult result, TwitterResponse response)
 {
     TwitterStatus[] statusesArray = result.Statuses.ToArray();
     for (int i = 0; i < statusesArray.Length; i++)
     {
         string name     = statusesArray[i].Author.ScreenName;
         string imageurl = statusesArray[i].Author.ProfileImageUrl;
         string text     = statusesArray[i].Text;
         System.Console.WriteLine(name);
         System.Console.WriteLine(text);
         System.Console.WriteLine(result.ToString());
     }
 }
Esempio n. 2
0
        private void messageResult(TwitterSearchResult result, TwitterResponse response)
        {
            if (result != null)
            {
                json = result.ToString();
                TwitterStatus[] statusesArray = result.Statuses.ToArray();
                for (int i = 0; i < statusesArray.Length; i++)
                {
                    item.Add(new TwiterItem()
                    {
                        Message     = statusesArray[i].Text,
                        UserName    = statusesArray[i].Author.ScreenName,
                        ImageSource = statusesArray[i].Author.ProfileImageUrl
                    });
                }

                Dispatcher.BeginInvoke(() =>
                {
                    listBox1.ItemsSource = item;
                });
            }
        }