public void fuc_DoubleClick(object sender, EventArgs e) { UControl fuc = (UControl)sender; if (fuc.CurFriend.isopen == true) { return; } fuc.CurFriend.isopen = true; fuc.CurFriend.formchat.Show(); //fuc.ti_ucfriend.Enabled = true; //FormChat fc = new FormChat(fuc.CurFriend); //Operation }
/// <summary> /// 代理添加好友 /// </summary> /// <param name="ipAll"></param> /// <param name="msgAll"></param> public void ucfshow(Friend friend) { //FormFriendList ffl = this; UControl fuc = new UControl(); fuc.Ffl = _ffl; fuc.CurFriend = friend; //fuc.for = _fc; Listfriend.Add(friend); //双击事件 fuc.DoubleClick += new EventHandler(_ffl.fuc_DoubleClick); fuc.Top = _ffl.pn_FriendList.Controls.Count * fuc.Height; fuc.ti_ucfriend.Enabled = true; _ffl.pn_FriendList.Controls.Add(fuc); }