コード例 #1
0
ファイル: MainForm.cs プロジェクト: xydoublez/GGTalk-V5.5
        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();
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: GamesDesignArt/GGTalk
 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();
     }
 }