public void Update(UserDescription description) { Name = description.Name; DisplayName = description.DisplayName; Status = description.Status; Relation = UserRelation.None; if (description.Friend ?? false) { Relation = UserRelation.Friend; } else if (client.Me == null) { Relation = UserRelation.Me; } Changed.SafeInvoke(this, new EventArgs()); }
public void Update(UserDescription description) { Name = description.Name; DisplayName = description.DisplayName; Status = description.Status; Relation = UserRelation.None; if (description.Friend ?? false) Relation = UserRelation.Friend; else if (client.Me == null) Relation = UserRelation.Me; Changed.SafeInvoke(this, new EventArgs()); }
public User(ChatClient client, UserDescription description) { this.client = client; Update(description); client.UserChat += client_UserChat; }