Exemple #1
0
        /// <summary>
        /// 删除朋友
        /// </summary>
        /// <param name="listBox"></param>
        public static void DelFriend(ref ListBox listBox)
        {
            List <string> listFri = new List <string>();

            foreach (string s in listBox.SelectedItems)
            {
                listFri.Add(s);
            }
            BLLControl.DelFocus(listFri);
        }
Exemple #2
0
        /// <summary>
        /// 在朋友消息界面直接操作
        /// </summary>
        /// <param name="strCmd"></param>
        /// <param name="listBox"></param>
        public static void FriendsMessageCommand(string strCmd, ref ListBox listBox)
        {
            List <TFriendMessage> listMsg = (List <TFriendMessage>)listBox.Tag;

            if (listBox.SelectedIndex == -1)
            {
                return;
            }

            TFriendMessage msg = listMsg[listBox.SelectedIndex];

            switch (strCmd)
            {
            case "Accept":
            case "I Invite":
            {
                List <string> friList = new List <string>();
                friList.Add(msg.FromVssID);
                BLLControl.AddFocus(friList);
                break;
            }

            case "Stop Friend":
            {
                List <string> friList = new List <string>();
                friList.Add(msg.FromVssID);
                BLLControl.DelFocus(friList);
                break;
            }

            case "Ignore":
            case "I Know":
            default:
            {
                break;
            }
            }

            BLLControl.DelFriendMessage(msg.MessageID);
        }