public List <FriendTimelineList> GetUserTimeline(string userid, string format, string apiToken, string apiTokenSecret) { SinaApiService myApi = new SinaApiService(); string myResult = myApi.user_timeline(userid, format, consumerKey, consumerKeySecret, apiToken, apiTokenSecret); XDocument doc = XDocument.Parse(myResult); return(FriendTimelineList.Parse(doc.Root)); }
private void btFavorite_Click(object sender, RoutedEventArgs e) { HyperlinkButton tmpButton = (HyperlinkButton)sender; FriendTimelineList FriendTimelineItem = (FriendTimelineList)tmpButton.DataContext; if (FriendTimelineItem != null) { FriendTimelineItem.IsFavorited = true; CreateFavorite(FriendTimelineItem.FriendTwitterID); } }
private void btComment_Click(object sender, RoutedEventArgs e) { HyperlinkButton tmpButton = (HyperlinkButton)sender; FriendTimelineList FriendTimelineItem = (FriendTimelineList)tmpButton.DataContext; if (FriendTimelineItem != null) { userCommentChildWindow = new UserCommentChildWindow(FriendTimelineItem.FriendTwitterID); userCommentChildWindow.Show(); } }
private void retweetImageViewer_Click(object sender, RoutedEventArgs e) { HyperlinkButton tmpLinkButton = (HyperlinkButton)sender; FriendTimelineList FriendTimelineItem = (FriendTimelineList)tmpLinkButton.DataContext; if (FriendTimelineItem != null) { imageViewerChildWindow = new ImageViewerChildWindow(FriendTimelineItem.UsersItem.FriendName, FriendTimelineItem.RetweeterItem.MiddleImageURL, FriendTimelineItem.RetweeterItem.OriginalImageURL); imageViewerChildWindow.Show(); } }
private void btDelete_Click(object sender, RoutedEventArgs e) { HyperlinkButton tmpButton = (HyperlinkButton)sender; FriendTimelineList FriendTimelineItem = (FriendTimelineList)tmpButton.DataContext; if (FriendTimelineItem != null) { StatusDeleteByID(FriendTimelineItem.FriendTwitterID); this.friendtimelinecollection.Remove(FriendTimelineItem); } }
private void btRepost_Click(object sender, RoutedEventArgs e) { HyperlinkButton tmpButton = (HyperlinkButton)sender; FriendTimelineList FriendTimelineItem = (FriendTimelineList)tmpButton.DataContext; if (FriendTimelineItem != null) { userMentionChildWindow = new UserMentionChildWindow(FriendTimelineItem.FriendTwitterID); userMentionChildWindow.Closed += UserMentionChildWindow_Close; userMentionChildWindow.Show(); //RepostStatus(FriendTimelineItem.FriendTwitterID, "", 0); } }
private void btUnFavorite_Click(object sender, RoutedEventArgs e) { HyperlinkButton tmpButton = (HyperlinkButton)sender; FriendTimelineList FriendTimelineItem = (FriendTimelineList)tmpButton.DataContext; if (FriendTimelineItem != null) { FriendTimelineItem.IsFavorited = false; foreach (FavoriteList item in Globals.FavoriteCollection) { if (item.FriendTwitterID == FriendTimelineItem.FriendTwitterID) { Globals.FavoriteCollection.Remove(item); DelFavorite(FriendTimelineItem.FriendTwitterID); break; } } } }