Exemple #1
0
        public void AddFriend(string friendID)
        {
            AddFriendForm form = new AddFriendForm(this.rapidPassiveEngine, this, this.globalUserCache.CurrentUser, friendID);

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.globalUserCache.CurrentUser.AddFriend(form.FriendID, form.CatalogName);
                GGUser user = this.globalUserCache.GetUser(form.FriendID);
                this.friendListBox1.AddUser(user);
                ChatForm chatForm = this.GetChatForm(form.FriendID);
                chatForm.AppendSysMessage("您已经成功将对方添加为好友,可以开始对话了...");
                chatForm.Show();
                chatForm.Focus();
            }
        }
Exemple #2
0
 public void AddFriend(string friendID )
 {
     AddFriendForm form = new AddFriendForm(this.rapidPassiveEngine, this, this.globalUserCache.CurrentUser ,friendID);
     if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         this.globalUserCache.CurrentUser.AddFriend(form.FriendID, form.CatalogName);
         GGUser user = this.globalUserCache.GetUser(form.FriendID);
         this.friendListBox1.AddUser(user);
         ChatForm chatForm = this.GetChatForm(form.FriendID);
         chatForm.AppendSysMessage("您已经成功将对方添加为好友,可以开始对话了...");
         chatForm.Show();
         chatForm.Focus();
     }
 }