public GroupMemberViewModel(AntSdkGroupMember user, string GroupAdminId, string groupId, GroupMemberListViewModel owner, string strKey, int adminCount = 0)
        {
            TalkGroupViewModel.isShowTransferAdminMenu += TalkGroupViewModel_isShowTransferAdminMenu;
            this.Owner   = owner;
            this.Member  = user;
            this.GroupId = groupId;
            AdminCount   = adminCount;
            keyword      = strKey;
            //if (!string.IsNullOrWhiteSpace(user.picture))
            //{
            //    this.Photo = user.picture;
            //}
            //else
            //{
            //    this.Photo = "pack://application:,,,/AntennaChat;Component/Images/27-头像.png";
            //}
            if (string.IsNullOrEmpty(user.userNum))
            {
                this.Name = user.userName;
            }
            else
            {
                this.Name = user.userNum + user.userName;
            }
            var cuss = AntSdkService.AntSdkListContactsEntity.users.FirstOrDefault(m => m.userId == user.userId);

            if (cuss != null && cuss.status == 0 && cuss.state == 0)
            {
                this.Name = this.Name + "(停用)";
            }
            else if (cuss == null)
            {
                this.Name = "离职人员";
            }
            this.Position      = user.position;
            this.PromptToolTip = string.Format("{0}({1})", this.Name, this.Position);
            if (GroupAdminId == AntSdkService.AntSdkLoginOutput.userId && user.userId != AntSdkService.AntSdkLoginOutput.userId)
            {
                if (cuss != null && cuss.status == 2)
                {
                    ChangeMangerVisibility = KickoutGroupVisibility = Visibility.Visible;
                    IsSetGroupManager      = true;
                }
            }
            if (GroupAdminId == user.userId && cuss != null && cuss.status == 2)
            {
                AdminImageVisibility = Visibility.Visible;
                IsSetGroupManager    = false;
            }
            if (user.userId == AntSdkService.AntSdkLoginOutput.userId)
            {
                SendMsgVisibility = Visibility.Collapsed;
            }
            if (Member.roleLevel == (int)GlobalVariable.GroupRoleLevel.Admin)
            {
                GroupMenuContent  = "解除管理员";
                IsGroupAdminImage = true;
                if (cuss != null && cuss.status == 0)
                {
                    IsSetGroupManager = true;
                }
            }
            if (AdminCount >= 4 && Member.roleLevel != (int)GlobalVariable.GroupRoleLevel.Admin)
            {
                IsSetGroupManager = false;
            }
            //if (AntSdkService.AntSdkCurrentUserInfo.robotId == Member?.userId)
            //{
            //    IsSetGroupManager = false;
            //    ChangeMangerVisibility = KickoutGroupVisibility = Visibility.Collapsed;

            //}
            //if (Member.roleLevel== (int) GlobalVariable.GroupRoleLevel.Admin &&
            //    user.userId != AntSdkService.AntSdkLoginOutput.userId)
            //{
            //    KickoutGroupVisibility = Visibility.Visible;
            //}
            var userinfo = AntSdkService.AntSdkListContactsEntity.users.FirstOrDefault(c => c.userId == user.userId);

            if (userinfo != null)
            {
                contactUser = userinfo;
                if (AntSdkService.AntSdkCurrentUserInfo.robotId == userinfo.userId)
                {
                    IsSetGroupManager      = false;
                    ChangeMangerVisibility = KickoutGroupVisibility = Visibility.Collapsed;
                    userinfo.state         = (int)GlobalVariable.OnLineStatus.OnLine;
                    Name               = userinfo.userName;
                    Position           = userinfo.position;
                    this.PromptToolTip = string.Format("{0}({1})", this.Name, this.Position);
                    //    IsOfflineState = !AntSdkService.AntSdkIsConnected;
                }
                SetContactPhoto();
                //else
                //{
                //    if (!AntSdkService.AntSdkIsConnected)
                //    {
                //        IsOfflineState = true;
                //    }
                //    else
                //    {
                //        IsOfflineState = userinfo.state == (int)GlobalVariable.OnLineStatus.OffLine;
                //    }

                //}
                //if (!string.IsNullOrEmpty(userinfo?.state))
                //{
                //    var state = int.Parse(userinfo.state);
                if (!AntSdkService.AntSdkIsConnected)
                {
                    UserOnlineStateIcon = "";
                }
                else if (!IsOfflineState)
                {
                    if (GlobalVariable.UserOnlineSataeInfo.UserOnlineStateMinIconDic.ContainsKey(userinfo.state))
                    {
                        UserOnlineStateIcon = GlobalVariable.UserOnlineSataeInfo.UserOnlineStateMinIconDic[userinfo.state];
                    }
                }


                if (AntSdkService.AntSdkCurrentUserInfo.robotId == contactUser?.userId)
                {
                    IsOfflineState = !AntSdkService.AntSdkIsConnected;
                }
                else
                {
                    if (!AntSdkService.AntSdkIsConnected)
                    {
                        IsOfflineState = true;
                    }
                    else
                    {
                        IsOfflineState = contactUser?.state == (int)GlobalVariable.OnLineStatus.OffLine;
                    }
                }
                //}
            }
        }
 public GroupMemberViewModel(AntSdkGroupMember user, string GroupAdminId, string groupId,
                             GroupMemberListViewModel owner, string strKey, string PinYin)
     : this(user, GroupAdminId, groupId, owner, strKey)
 {
     pinYin = PinYin;
 }