Exemplo n.º 1
0
        public async void RefreshFavorites()
        {
            ShowingFavorites.Clear();
            try
            {
                var s = await kbtter.Token.Favorites.ListAsync(screen_name => user.ScreenName, count => showst);

                favoc = s.Last().Id;
                favnc = s.First().Id;
                ShowOlderFavoritesCommand.RaiseCanExecuteChanged();
                ShowNewerFavoritesCommand.RaiseCanExecuteChanged();
                foreach (var i in s)
                {
                    ShowingFavorites.Add(StatusViewModelExtension.CreateStatusViewModel(mainw, i));
                }
            }
            catch (TwitterException e)
            {
                favoc = 0;
                favnc = 0;
                mainw.NotifyInformation(string.Format("ツイートの取得に失敗しました : {0}", e.Message));
            }
            catch
            {
                favoc = 0;
                favnc = 0;
            }
        }
Exemplo n.º 2
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     mainw  = null;
     kbtter = null;
     user   = null;
     ShowingStatuses.Clear();
     ShowingFavorites.Clear();
     ShowingFriends.Clear();
     ShowingFollowers.Clear();
 }