public override void OnUserChanged(Session session, User user) { if (SessionUserChanged != null) { SessionUserChanged(session, user); } }
public override void OnUserLeftSession(Session session, User user) { LogWriteLine(string.Format("********* USER {0} ({1}) LEFT SESSION {2} ******", user.GetName().GetString(), user.GetID(), session.GetName().GetString())); if (SessionUserLeft != null) { SessionUserLeft(session, user); } }
public void UpdateUser(User user) { var myUser = _users.FirstOrDefault(u => u.GetID() == user.GetID()); if (myUser != null) { _users.Remove(myUser); _users.Add(user); } UpdateUserNames(); }
public void RemoveUser(User user) { _users.RemoveAll(u => u.GetID() == user.GetID()); UpdateUserNames(); }
public void AddUser(User user) { _users.Add(user); UpdateUserNames(); }
public override void OnUserChanged(Session session, User user) { SessionUserChanged?.Invoke(session, user); }
public override void OnUserJoinedSession(Session session, User user) { LogWriteLine(string.Format("********* USER {0} ({1}) JOINED SESSION {2} ******", user.GetName().GetString(), user.GetID(), session.GetName().GetString())); SessionUserJoined?.Invoke(session, user); }
private void OnSessionUserChanged(Session session, User user) { Dispatcher.RunAsync(CoreDispatcherPriority.Normal, new DispatchedHandler(() => { FindSession(session)?.UpdateUser(user); })); }