private void ProcessTweetMessages(object obj, DownloadStringCompletedEventArgs args) { try { System.Diagnostics.Debug.WriteLine(args.Result); StockTwits_Stream_Symbol s = JsonConvert.DeserializeObject <StockTwits_Stream_Symbol>(args.Result); Cursor = s.cursor; foreach (StockTwits_Message m in s.messages) { TweetCollection.Add(new TweetItemViewModel() { Author = m.user.name + " (" + m.user.username + ")", Content = m.body, PubDate = m.created_at }); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); System.Diagnostics.Debug.WriteLine(ex.Source); System.Diagnostics.Debug.WriteLine(ex.StackTrace); } if (ProgressBar != null) { ProgressBar.IsVisible = false; } this.IsDataLoaded = true; }
public void EmptyData() { Cursor = null; TweetCollection.Clear(); }