예제 #1
0
 public async Task<bool> BindToMentionsTimeline(UserAccountEntity userAccountEntry)
 {
     MentionsCollection = new InfiniteScrollingCollection
     {
         timeline = EndPoints.MENTIONS_TIMELINE,
         PostCollection = new ObservableCollection<PostEntity>(),
         userAccountEntity = userAccountEntry
     };
     List<PostEntity> items = await TimelineManager.GetMentions(false, null, null, null, App.userAccountEntity);
     foreach (PostEntity item in items)
     {
         MentionsCollection.PostCollection.Add(item);
     }
     MentionsCollection.MaxStatusId = items.Last().StatusID;
     MentionsTimeLine.DataContext = MentionsCollection;
     MentionsTimeLine.ItemRealized += mentionsTimeLine_ItemRealized;
     return true;
 }
예제 #2
0
 public async Task<bool> BindToConversationTimeline(UserAccountEntity userAccountEntry)
 {
     ConversationCollection = new InfiniteScrollingCollection
     {
         timeline = EndPoints.PUBLIC_TIMELINE,
         PostCollection = new ObservableCollection<PostEntity>(),
         userAccountEntity = userAccountEntry
     };
     List<PostEntity> items =
         await TimelineManager.GetConversation(App.ViewModel.SelectedPost, App.userAccountEntity);
     foreach (PostEntity item in items)
     {
         ConversationCollection.PostCollection.Add(item);
     }
     ConversationCollection.MaxStatusId = items.Last().StatusID;
     conversationTimeLine.DataContext = ConversationCollection;
     return true;
 }
예제 #3
0
 public async Task<bool> BindToPublicTimeline(UserAccountEntity userAccountEntry)
 {
     progressBar.Visibility = Visibility.Visible;
     PublicCollection = new InfiniteScrollingCollection
     {
         timeline = EndPoints.PUBLIC_TIMELINE,
         PostCollection = new ObservableCollection<PostEntity>(),
         userAccountEntity = userAccountEntry
     };
     List<PostEntity> items =
         await TimelineManager.GetPublicTimeline(false, null, null, null, App.userAccountEntity);
     foreach (PostEntity item in items)
     {
         PublicCollection.PostCollection.Add(item);
     }
     PublicCollection.MaxStatusId = items.Last().StatusID;
     publicTimeLine.DataContext = PublicCollection;
     publicTimeLine.ItemRealized += publicTimeLine_ItemRealized;
     progressBar.Visibility = Visibility.Collapsed;
     return true;
 }
예제 #4
0
 public async Task<bool> BindToSearchTimeline(UserAccountEntity userAccountEntity)
 {
     progressBar.Visibility = Visibility.Visible;
     searchVoiceCollection = new InfiniteScrollingCollection();
     searchVoiceCollection.timeline = EndPoints.USER_TIMELINE;
     searchVoiceCollection.PostCollection = new ObservableCollection<PostEntity>();
     searchVoiceCollection.userAccountEntity = userAccountEntity;
     //searchVoiceCollection.userName = App.ViewModel.SelectedUser.ScreenName;
     //searchVoiceCollection.UserId = App.ViewModel.SelectedUser.UserID;
     searchVoiceCollection.Query = SearchBox.Text;
     SearchEntity searchEntity =
         await SearchManager.SearchStatusList(SearchBox.Text, null, null, null, false, true, userAccountEntity);
     List<PostEntity> items = searchEntity.PostList;
     foreach (PostEntity item in items)
     {
         searchVoiceCollection.PostCollection.Add(item);
     }
     searchVoiceCollection.MaxStatusId = items.Last().StatusID;
     voiceList.DataContext = searchVoiceCollection;
     voiceList.ItemRealized += voiceList_ItemRealized;
     progressBar.Visibility = Visibility.Collapsed;
     return true;
 }
예제 #5
0
 public async Task<bool> BindToUserTimeline(UserAccountEntity userAccountEntry)
 {
     UserCollection = new InfiniteScrollingCollection
     {
         timeline = EndPoints.USER_TIMELINE,
         PostCollection = new ObservableCollection<PostEntity>(),
         userAccountEntity = userAccountEntry,
         userName = _selectedUser.ScreenName,
         UserId = _selectedUser.UserID
     };
     List<PostEntity> items =
         await
             TimelineManager.GetUserTimeline(_selectedUser.ScreenName,
                 _selectedUser.UserID, null, null, null, null, App.userAccountEntity);
     foreach (PostEntity item in items)
     {
         UserCollection.PostCollection.Add(item);
     }
     UserCollection.MaxStatusId = items.Last().StatusID;
     userTimeLine.DataContext = UserCollection;
     userTimeLine.ItemRealized += userTimeLine_ItemRealized;
     return true;
 }