Exemple #1
0
 private void denyFriendRequestToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (list_friendreq.SelectedItem != null)
     {
         ulong SteamID = Convert.ToUInt64(column_friendreq_sid.GetValue(list_friendreq.SelectedItem.RowObject));
         bot.SteamFriends.IgnoreFriend(SteamID);
         list_friendreq.SelectedItem.Remove();
         ListFriendRequests.Remove(SteamID);
     }
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     list_friendreq.Visible = !list_friendreq.Visible;
     if (list_friendreq.Visible)
     {
         ShrinkFriends();
     }
     else
     {
         GrowFriends();
     }
     list_friendreq.SetObjects(ListFriendRequests.Get());
 }
Exemple #3
0
 public void HideFriendRequests()
 {
     bot.main.Invoke((Action)(() =>
     {
         if (list_friendreq.Visible)
         {
             list_friendreq.Visible = false;
             friends_list.Height = friends_list.Height + list_friendreq.Height;
             friends_list.Location = new Point(friends_list.Left, friends_list.Top - list_friendreq.Height);
             list_friendreq.SetObjects(ListFriendRequests.Get());
         }
     }));
 }
        public static ulong GetSID(string name)
        {
            ListFriendRequests item = null;

            try
            {
                item = list.Find(x => x.name == name);
                return(item.sid);
            }
            catch
            {
            }
            return(0);
        }
Exemple #5
0
        public static void UpdateStatus(ulong sid, string status)
        {
            ListFriendRequests item = null;

            try
            {
                item        = list.Find(x => x.SteamID == sid);
                item.Status = status;
            }
            catch
            {
                // Friends form hasn't been initialized yet, so let's not worry about it
            }
        }
 public static void Add(string name, ulong sid, string status = "Offline")
 {
     ListFriendRequests item = new ListFriendRequests(name, sid, status);
     list.Add(item);
 }
        public static void Remove(ulong sid)
        {
            ListFriendRequests item = list.Find(x => x.sid == sid);

            list.Remove(item);
        }
        public static void Add(string name, ulong sid, string status = "Offline")
        {
            ListFriendRequests item = new ListFriendRequests(name, sid, status);

            list.Add(item);
        }
Exemple #9
0
 private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
 {
     list_friendreq.SetObjects(ListFriendRequests.Get());
 }