Inheritance: global::System.IDisposable
 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);
            }
        }
示例#3
0
 public void UpdateUser(User user)
 {
     var myUser = _users.FirstOrDefault(u => u.GetID() == user.GetID());
     if (myUser != null)
     {
         _users.Remove(myUser);
         _users.Add(user);
     }
     UpdateUserNames();
 }
示例#4
0
 public void RemoveUser(User user)
 {
     _users.RemoveAll(u => u.GetID() == user.GetID());
     UpdateUserNames();
 }
示例#5
0
 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);
        }
示例#8
0
 private void OnSessionUserChanged(Session session, User user)
 {
     Dispatcher.RunAsync(CoreDispatcherPriority.Normal, new DispatchedHandler(() =>
     {
         FindSession(session)?.UpdateUser(user);
     }));
 }