public void setup(string name, int index2)//first name in { index = index2; tag = new FriendInfo(name); tag.group(); tag.setabove += new SetAbove2(Helpsetabove); tag.setabove4 += new SetAbove4(Helpsetabove); tag.SetPortrait(new Bitmap("./Resources/headP/default.jpg")); }
private bool RefreshShow(Friend friend) { FriendInfo TempTag = friend.tag; string TempString = friend.Name; for (int i = 0; i < FriendLayoutPanel.Controls.Count; i++) { if (FriendLayoutPanel.Controls[i].Name == TempString) { //break; return(true); } } FriendLayoutPanel.Controls.Add(TempTag); return(true); }
public Friend(string name) { Name = name; if (System.IO.File.Exists("./Resources/headP/" + Name + ".jpg")) { headP = new Bitmap("./Resources/headP/" + Name + ".jpg"); } else { headP = new Bitmap("./Resources/headP/(" + Convert.ToString(Convert.ToInt32(Name.Substring(8)) % 19 + 1) + ").jpg"); } tag = new FriendInfo(Name); tag.setabove += new SetAbove2(Helpsetabove); tag.setabove4 += new SetAbove4(Helpsetabove5); tag.SetPortrait(headP); return; }