예제 #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);
     }
 }
예제 #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());
 }
예제 #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());
         }
     }));
 }
예제 #4
0
        public static ulong GetSID(string name)
        {
            ListFriendRequests item = null;

            try
            {
                item = list.Find(x => x.name == name);
                return(item.sid);
            }
            catch
            {
            }
            return(0);
        }
예제 #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
            }
        }
예제 #6
0
 public static void Add(string name, ulong sid, string status = "Offline")
 {
     ListFriendRequests item = new ListFriendRequests(name, sid, status);
     list.Add(item);
 }
예제 #7
0
        public static void Remove(ulong sid)
        {
            ListFriendRequests item = list.Find(x => x.sid == sid);

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

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