public void addUcf(Friend f) { UCFriend ucf = new UCFriend(); ucf.Frm = this; ucf.CurFriend = f; ucf.Top = this.friendList.Controls.Count * ucf.Height; ucf.DoubleClick += ucf_DoubleClick; this.friendList.Controls.Add(ucf); ucflist.Add(ucf); if (this.friendList.Controls.Count >= 6) { for (int j = 0; j < this.friendList.Controls.Count; j++) { this.friendList.Controls[j].Width = 230; } } }
public ChatForm(UCFriend ucf) { InitializeComponent(); this.Text="与"+ ucf.CurFriend.NickName +"聊天中"; this.friendheadimg.Image = ucf.Frm.ilHeadImages.Images[ucf.CurFriend.HeadImageIndex]; }