protected void btnFollowAll_Click(object sender, EventArgs e)
        {
            if (ListUsers.Count > 0)
            {
                bool friendsChanged = false;

                TwitterAuthenticate();
                try {
                    foreach (Twitter.User user in ListUsers)
                    {
                        twdata = new Twitter(user, Twitter.TwitterType.Friends);
                        if (!ListFriends.Contains(user))
                        {
                            ListFriends.Add(user);
                            friendsChanged = true;
                        }
                        ListUsers.Remove(user);
                    }
                    ListUsers.Clear();
                    if (friendsChanged)
                    {
                        Serializer.WriteFollowersXML(ListFriends.ToList(), Constants.FriendsFollowers.Friends.ToString());
                    }

                    Serializer.WriteFollowersXML(ListUsers.ToList(), Constants.FriendsFollowers.NotFollowing.ToString());
                    Serializer.WriteFollowersXML(ListUsers.ToList(), Constants.FriendsFollowers.Users.ToString());
                    BindData();
                } catch (WebException wex) {
                    BindData();
                    ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", string.Format("alert('{0}');", "No internet connection: " + wex.Message.Replace("'", string.Empty)), true);
                } catch (Exception ex) {
                    //do nothing
                }
            }
        }
        protected void btnDestroy_Click(object sender, EventArgs e)
        {
            if (ListUsers.Count > 0)
            {
                bool usersChanged     = false;
                bool followersChanged = false;

                TwitterAuthenticate();
                try {
                    foreach (GridViewRow row in gvUsers.Rows)
                    {
                        Control ctrl = row.FindControl("cbxDelete");
                        if (ctrl != null)
                        {
                            CheckBox cbx = (CheckBox)ctrl;
                            if (cbx.Checked)
                            {
                                Control lblctrl = row.FindControl("lblUserId");
                                if (lblctrl != null)
                                {
                                    Label lbl  = (Label)lblctrl;
                                    var   user = ListUsers.Where(k => k.UserId == lbl.Text).FirstOrDefault();
                                    if (user != null)
                                    {
                                        twdata = new Twitter(user, Twitter.TwitterType.Unfollow);
                                        Twitter.User utoremove = ListFriends.Find(x => x.UserId == user.UserId);
                                        if (utoremove != null && ListFriends.Contains(utoremove))
                                        {
                                            ListFriends.Remove(utoremove);
                                            followersChanged = true;
                                        }
                                        ListUsers.Remove(user);
                                        usersChanged = true;
                                    }
                                }
                            }
                        }
                    }
                    if (followersChanged)
                    {
                        Serializer.WriteFollowersXML(ListFriends.ToList(), Constants.FriendsFollowers.Friends.ToString());
                    }
                    if (usersChanged)
                    {
                        Serializer.WriteFollowersXML(ListUsers.ToList(), Constants.FriendsFollowers.Analyze.ToString());
                        Serializer.WriteFollowersXML(ListUsers.ToList(), Constants.FriendsFollowers.Unfollow.ToString());
                        Serializer.WriteFollowersXML(ListUsers.ToList(), Constants.FriendsFollowers.Users.ToString());
                    }
                    BindData();
                } catch (WebException wex) {
                    BindData();
                    ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", string.Format("alert('{0}');", "No internet connection: " + wex.Message.Replace("'", string.Empty)), true);
                } catch (Exception ex) {
                    //do nothing
                }
            }
        }
        protected void btnDestroyAll_Click(object sender, EventArgs e)
        {
            if (ListUsers.Count > 0)
            {
                bool followersChanged = false;

                TwitterAuthenticate();
                try {
                    foreach (Twitter.User user in ListUsers)
                    {
                        twdata = new Twitter(user, Twitter.TwitterType.Unfollow);
                        Twitter.User utoremove = ListFriends.Find(x => x.UserId == user.UserId);
                        if (utoremove != null && ListFriends.Contains(utoremove))
                        {
                            ListFriends.Remove(utoremove);
                            followersChanged = true;
                        }
                    }
                    ListUsers.Clear();
                    if (followersChanged)
                    {
                        Serializer.WriteFollowersXML(ListFriends.ToList(), Constants.FriendsFollowers.Friends.ToString());
                    }

                    Serializer.DeleteListXML(Constants.FriendsFollowers.Analyze.ToString());
                    Serializer.DeleteListXML(Constants.FriendsFollowers.Unfollow.ToString());
                    Serializer.WriteFollowersXML(ListUsers.ToList(), Constants.FriendsFollowers.Users.ToString());
                    BindData();
                } catch (WebException wex) {
                    BindData();
                    ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", string.Format("alert('{0}');", "No internet connection: " + wex.Message.Replace("'", string.Empty)), true);
                } catch (Exception ex) {
                    //do nothing
                }
            }
        }