/// <summary>Send the given private message to the given user</summary>
 /// <param name="user">The user to receive the message</param>
 /// <param name="message">The message to send to the user</param>
 public void Msg(User user, String message)
 {
     //FIXME: Make some error checking (empty message etc)
     model.ConnectionManager.Commands.Msg(user.UserId, message);
     var newSentMessage = new PrivateMessageItem(user, message);
     privateMessageModel.AddSentPrivateMessage(newSentMessage);
 }
Пример #2
0
 public ChatMessageItem(MessageEventArgs_300301 messageEventArgs,
                        User fromUser, bool isActionChatMessage)
 {
     this.isActionChatMessage = isActionChatMessage;
     this.messageEventArgs = messageEventArgs;
     this.fromUser = fromUser;
 }
Пример #3
0
        /// <summary>
        /// Adds the user in the given message if it isn'transfer already in the list 
        /// of user for this model. If the user exists it updates the user
        /// information.
        /// Call this method when a User List Message (310) is
        /// received from the server.
        /// </summary>
        /// <param name="message"></param>
        public void OnUserListMessage(MessageEventArgs_302310 message)
        {
            if (!UserExists(message.UserId)) {
                var newUser = new User(message);
                userList.Add(newUser);

                if (ClientJoined != null) {
                    ClientJoined(newUser);
                }
            } else {
                var u = GetUser(message.UserId);
                if (u != null) {
                    u.UpdateUserInformation(message);
                }
            }
        }
Пример #4
0
 public WiredListViewItem(User user, string[] subItems, string imageKey)
     : base(subItems, imageKey)
 {
     UserItem = user;
 }
Пример #5
0
 public WiredListViewItem(User user, string nick, string imageIndex)
     : base(nick, imageIndex)
 {
     UserItem = user;
 }
Пример #6
0
 /// <summary>Request the user information for the given user.</summary>
 /// <param name="user"></param>
 public void GetUserInfo(User user)
 {
     commands.Info(user.UserId);
 }