void uf_shangji(object o, EventArgs e) { UcFriends ucf = (UcFriends)o; ucf.BackColor = System.Drawing.SystemColors.Control; ucf.stopFlash(); int i = 0; for (i = 0; i < friendsInformationList.Count; i++) { if (friendsInformationList[i].IPaddress1 == ucf.IPaddress1) { this.combFriend.Items.Add(friendsInformationList[i].Name); break; } } FrmChat frmchat = new FrmChat(friendsInformationList[i], this); if (friendsInformationList[i].Ischat1) { return; } friendsInformationList[i].Frmchat = frmchat; friendsInformationList[i].Frmchat.Show(); friendsInformationList[i].Ischat1 = true; }
public void addFriends(FriendsInfo friend) { UcFriends uf = new UcFriends(); uf.Name = friend.Name; uf.Signatrue = friend.Signature; int headindex = Convert.ToInt16(friend.Image); uf.Image = this.headImageindex.Images[headindex]; uf.IPaddress1 = friend.IPaddress1; uf.Top = this.panelFriend.Controls.Count * uf.Height; uf.Left = 0; //uf.Description = ucDescription; string description; string dpath = Application.StartupPath + @"\好友备注\" + uf.IPaddress1 + ".ini"; using (StreamReader sr = new StreamReader(dpath, Encoding.Default)) { description = sr.ReadLine(); } uf.Description = description; this.panelFriend.Controls.Add(uf); uf.shangji += uf_shangji; }
public void createByfriendsInformationList(FriendsInfo fi) { FrmLogout fl = new FrmLogout(this, fi); fl.Show(); this.panelFriend.Controls.Clear(); foreach (FriendsInfo f in friendsInformationList) { UcFriends ucf = new UcFriends(); if (f.Sendmessage.Count > 0) { ucf.BackColor = System.Drawing.Color.Red; } ucf.Name = f.Name; ucf.Image = this.headImageindex.Images[Convert.ToInt32(f.Image)]; ucf.IPaddress1 = f.IPaddress1; ucf.Signatrue = f.Signature; //ucf.Description = ucDescription; string description; string dpath = Application.StartupPath + @"\好友备注\" + f.IPaddress1 + ".ini"; using (StreamReader sr = new StreamReader(dpath, Encoding.Default)) { description = sr.ReadLine(); } ucf.Description = description; ucf.Top = this.panelFriend.Controls.Count * ucf.Height; this.panelFriend.Controls.Add(ucf); ucf.shangji += uf_shangji; } }
public void addFriends(FriendsInfo friend) { UcFriends uf = new UcFriends(); uf.Name = friend.Name; uf.Signatrue = friend.Signature; int headindex = Convert.ToInt16(friend.Image); uf.Image = _zyr.headImageindex.Images[headindex]; uf.IPaddress1 = friend.IPaddress1; uf.Top = this.chatPanel.Controls.Count * uf.Height; uf.Left = 0; this.chatPanel.Controls.Add(uf); }
public void ucChangecolor(string ip) { int num = 0; while (num < panelFriend.Controls.Count) { UcFriends uf = (UcFriends)panelFriend.Controls[num]; if (uf.IPaddress1 == ip) { uf.BackColor = System.Drawing.Color.Red; } num++; } }
public void createfriendsInformationList() { this.chatPanel.Controls.Clear(); foreach (FriendsInfo f in _zyr.ChatroomFriends) { UcFriends ucf = new UcFriends(); if (f.Sendmessage.Count > 0) { ucf.BackColor = System.Drawing.Color.Red; } ucf.Name = f.Name; ucf.Image = this._zyr.headImageindex.Images[Convert.ToInt32(f.Image)]; ucf.IPaddress1 = f.IPaddress1; ucf.Signatrue = f.Signature; ucf.Top = this.chatPanel.Controls.Count * ucf.Height; this.chatPanel.Controls.Add(ucf); } }
public FrmDescription(UcFriends ucf) { InitializeComponent(); _ucf = ucf; }
public void startTimer(UcFriends uc) { uc.startFlash(); }