Ejemplo n.º 1
0
        /// <summary>
        /// Gets followed streamers
        /// </summary>
        /// <returns>UserFollowData object wich has a list of followed streamers' information</returns>
        private async Task <UserFollowData> getFollowedStreamers()
        {
            //used
            UserFollowData returnValue = null;

            string twitchUserName = txtTwitchUserName.Text;
            int    twitchUserID;

            twitchUserID = await getUserID(twitchUserName);

            returnValue = APICalls.GetFollowedStreamers(twitchUserID);

            return(returnValue);
        }
        /// <summary>
        /// Button click event that gets the previous 20 followed streamers and loads them into the datagridview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PreviousButton_Click(object sender, EventArgs e)
        {
            _paginationStack.Pop();
            _paginationStack.Pop();

            if (_paginationStack.Count == 0)
            {
                LoadTabFollowedStreamers(APICalls.GetFollowedStreamers(_userID));
                PreviousButton.Visible = false;
            }
            else
            {
                string pagination = _paginationStack.Peek();
                LoadTabFollowedStreamers(APICalls.GetFollowedStreamersNext(_userID, pagination));
            }
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="userID"></param>
 public void setupStreamerPickControl(int userID)
 {
     _userID = userID;
     LoadTabFollowedStreamers(APICalls.GetFollowedStreamers(_userID));
 }
        /// <summary>
        /// Button click event that fills the datagridview with criteria based in the combobox
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ApplyButton_Click(object sender, EventArgs e)
        {
            int numOfObjects = int.Parse(ItemsPerPageComboBox.Text);

            LoadTabFollowedStreamers(APICalls.GetFollowedStreamers(_userID, numOfObjects));
        }