Exemple #1
0
        private void removeFriendToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string name = bot.SteamFriends.GetFriendPersonaName(userSteamId);
            var    dr   = MetroFramework.MetroMessageBox.Show(this, "Are you sure you want to remove " + name + "?",
                                                              "Remove Friend",
                                                              MessageBoxButtons.YesNo,
                                                              MessageBoxIcon.Exclamation,
                                                              MessageBoxDefaultButton.Button1);

            if (dr == System.Windows.Forms.DialogResult.Yes)
            {
                ListFriends.Remove(userSteamId);
                bot.friends.Remove(userSteamId);
                bot.SteamFriends.RemoveFriend(userSteamId);
                UpdateChat("[" + DateTime.Now + "] You have removed " + steam_name.Text + " from your friends list." + Environment.NewLine, false);
                if (Friends.keepLog)
                {
                    AppendLog(userSteamId, "[" + DateTime.Now + "] You have removed " + steam_name.Text + " from your friends list." + Environment.NewLine);
                }
                MetroFramework.MetroMessageBox.Show(this, "You have removed " + name + ".",
                                                    "Remove Friend",
                                                    MessageBoxButtons.OK,
                                                    MessageBoxIcon.Information,
                                                    MessageBoxDefaultButton.Button1);
            }
        }
Exemple #2
0
 private void removeFriendToolStripMenuItem_Click(object sender, EventArgs e)
 {
     bot.SteamFriends.RemoveFriend(sid);
     UpdateChat("[" + DateTime.Now + "] You have removed " + steam_name.Text + " from your friends list.\r\n", false);
     if (Friends.keepLog)
     {
         AppendLog(sid, "[" + DateTime.Now + "] You have removed " + steam_name.Text + " from your friends list.\r\n");
     }
     ListFriends.Remove(sid);
 }
Exemple #3
0
 private void removeFriendToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (friends_list.SelectedItem != null)
     {
         ulong sid = Convert.ToUInt64(column_sid.GetValue(friends_list.SelectedItem.RowObject));
         bot.SteamFriends.RemoveFriend(sid);
         bot.friends.Remove(sid);
         ListFriends.Remove(sid);
         friends_list.RemoveObject(friends_list.SelectedItem.RowObject);
         MessageBox.Show("You have removed " + bot.SteamFriends.GetFriendPersonaName(sid),
                         "Remove Friend",
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Exclamation,
                         MessageBoxDefaultButton.Button1);
     }
 }