Пример #1
0
        private void TW_lbFollowers_SelectedIndexChanged(object sender, EventArgs e)
        {
            long id = 0;

            try
            {
                id = ts.UserFollowers[TW_lbFollowers.SelectedIndex].Id;
                gs.TW_UserDataByID(id.ToString());
                GridViewUpdate(gs.TwitterData, TW_dgvFollowerDetail);
            }
            catch { }
        }
Пример #2
0
        private void TW_lbSearchResult_SelectedIndexChanged(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            this.Text      = TW_lbSearchResult.SelectedItem.ToString();
            //*** accessing selected item's index from the main search list
            TW_dgvProfileInfo.DataSource = null;
            TW_dgvProfileInfo.Rows.Clear();
            TW_dgvProfileInfo.Refresh();
            KeyValuePair <String, String> pair = ts.ResultSearch.ElementAt(TW_lbSearchResult.SelectedIndex);

            //*** result in TwitterData
            ts.TW_UserDataByID(pair.Key.ToString());
            GridViewUpdate(ts.TwitterData, TW_dgvProfileInfo);

            var nameOfProperty = "ProfileImageUrl";
            var propertyInfo   = ts.TwitterData.GetType().GetProperty(nameOfProperty);
            var value          = propertyInfo.GetValue(ts.TwitterData, null);

            value = ts.TwitterData.ProfileImageUrl.ToString();
            TW_pbxProfile.Image = GetImageFromUrl(value);
            Cursor.Current      = Cursors.Default;
        }