Example #1
0
        /// <summary>
        /// 增加新朋友
        /// </summary>
        public static void AddFriend()
        {
            string friID = Interaction.InputBox("Input his/her VSSID please:");

            if (friID == "" || friID == BLLControl.GetValidator().VssID)
            {
                return;
            }
            List <string> friList = new List <string>();

            friList.Add(friID);
            BLLControl.AddFocus(friList);
        }
Example #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);
        }