示例#1
0
        private UserInfo AddUser(AddUserNetworkData addUserNetworkData)
        {
            var user = new UserInfo
            {
                AccountId    = addUserNetworkData.AccountId,
                Name         = addUserNetworkData.UserName,
                CurrentState = addUserNetworkData.State,
                IsSelf       = false,
                ID           = addUserNetworkData.Id,
                Ip           = addUserNetworkData.Ip
            };

            userList.Add(user);
            CheckLeaderExist();
            return(user);
        }
示例#2
0
        private User AddUser(AddUserNetworkData addUserNetworkData)
        {
            var user = new User
            {
                AccountId    = addUserNetworkData.AccountId,
                Name         = addUserNetworkData.UserName,
                CurrentState = addUserNetworkData.State,
                Color        = RandomColorGenerator.GetColor(),
                IsSelf       = false,
                ID           = addUserNetworkData.Id
            };

            userList.Add(user);
            chatComponent.AddSystemMessage(String.Format(Utility.Language["UserEnterRoom"], user.Name));

            return(user);
        }