コード例 #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
ファイル: ListFriendRequests.cs プロジェクト: xaustinx/Mist
        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());
 }