Example #1
0
        public void AddNewUser(string userName, string connectionId)
        {
            var user = new User
                        {
                            Name = userName,
                            RoomIn = "",
                            ConnectionId = connectionId,
                            RoomsWatching = new List<string>(),
                            WatchingPasswords = new List<string>()
                        };

            _users.Add(userName, user);
        }
Example #2
0
 private string GetRoomPasswordForUser(User user, string roomName)
 {
     var index = user.RoomsWatching.IndexOf(roomName);
     return index >= 0 ? user.WatchingPasswords[index] : "";
 }
Example #3
0
 public void DrawMove(User user, int x, int y)
 {
     _clients[user.RoomIn].PartnerDrawMove(user.Name, x, y);
 }
Example #4
0
 public void DrawStart(User user, string color, int thickness, int x, int y)
 {
     _clients[user.RoomIn].PartnerDrawStart(user.Name, color, thickness, x, y);
 }
Example #5
0
 public void DrawEnd(User user)
 {
     _clients[user.RoomIn].PartnerDrawEnd(user.Name);
 }