示例#1
0
        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));
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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();
            }
        }
示例#4
0
        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();
            }
        }
示例#5
0
        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);
            }
        }
示例#6
0
        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);
            }
        }
示例#7
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;
                    }
                }
            }
        }