⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contact.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:

        public virtual bool EnableSMS
        {
            get
            {
                if (this is Imps.Client.Core.MobileBuddy)
                {
                    int? relationStatus = this.RelationStatus;
                    if ((relationStatus.GetValueOrDefault() == 1) && relationStatus.get_HasValue())
                    {
                        return true;
                    }
                }
                if (this.Presence.IsSmsOffline)
                {
                    return false;
                }
                return this.EnableIM;
            }
        }

        public bool EnableViewFeike
        {
            get
            {
                if (this.Type == ContactType.Vodafone)
                {
                    return false;
                }
                if (this.Type == ContactType.MobileBuddy)
                {
                    return false;
                }
                if (base.Owner.Status == UserAccountStatus.OfflineLogon)
                {
                    return false;
                }
                return true;
            }
        }

        internal bool GetContactsInfoOK
        {
            get
            {
                if (!this.EnableGetContactInfo)
                {
                    return true;
                }
                if (this.BeenSubscribedPresence)
                {
                    return this._getContactsInfoOK;
                }
                return false;
            }
            set
            {
                this._getContactsInfoOK = value;
            }
        }

        public bool HasCustimizedPermissions
        {
            get
            {
                return (this._permissionDict != null);
            }
        }

        internal virtual string InnerLocalName
        {
            get
            {
                if (this.PersonalInfo.Name.HasUserSetData && !string.IsNullOrEmpty(this.PersonalInfo.Name.UserSetData.OriginalValue))
                {
                    return this.PersonalInfo.Name.UserSetData.OriginalValue;
                }
                return string.Empty;
            }
        }

        public bool IsAllowContact
        {
            get
            {
                return (this.Permissions.PermissionPointContact.FinalValue == 2);
            }
        }

        public bool IsBlocked
        {
            get
            {
                if (this.IsInBlackList)
                {
                    return true;
                }
                if (!base.Owner.Uri.EqualsSmartly(this.Uri))
                {
                    try
                    {
                        return (this.Permissions.PermissionPointContact.FinalValue == 2);
                    }
                    catch (Exception exception)
                    {
                        LogHelper.LogException(exception);
                    }
                }
                return false;
            }
        }

        public bool IsInBlackList
        {
            get
            {
                return base.Owner.BlackList.Contains(this.Uri);
            }
        }

        public bool IsOpenIdentity
        {
            get
            {
                return (this.Permissions.PermissionPointIdentity.FinalValue == 1);
            }
        }

        public DateTime? LastChatTime
        {
            get
            {
                return this._lastChatTime;
            }
            internal set
            {
                this._lastChatTime = value;
            }
        }

        public ProposedData<bool> OnlineNotify
        {
            get
            {
                return this._onlineNotify;
            }
            internal set
            {
                this._onlineNotify = value;
            }
        }

        public PermissionDict Permissions
        {
            get
            {
                if ((this.Type == ContactType.ChatFriend) || (this.Type == ContactType.Stranger))
                {
                    return base.Owner.PermissionManager.GetDefaultContactPermission(this);
                }
                if (this._permissionDict == null)
                {
                    this._permissionDict = base.Owner.PermissionManager.GetDefaultContactPermission(this);
                }
                return this._permissionDict;
            }
        }

        public virtual Imps.Client.Core.ContactInfo PersonalInfo
        {
            get
            {
                return this._info;
            }
            internal set
            {
                this._info = value;
            }
        }

        public string Postfix
        {
            get
            {
                int? relationStatus = this.RelationStatus;
                if ((2 == relationStatus.GetValueOrDefault()) && relationStatus.get_HasValue())
                {
                    return StringTable.Buddy.PostfixReject;
                }
                int? nullable2 = this.RelationStatus;
                if ((nullable2.GetValueOrDefault() == 0) && nullable2.get_HasValue())
                {
                    return StringTable.Buddy.PostfixWaiting;
                }
                return string.Empty;
            }
        }

        public ContactPresence Presence
        {
            get
            {
                if (this._presence == null)
                {
                    this._presence = new ContactPresence(this);
                }
                return this._presence;
            }
        }

        public AmigoImage PresenceIcon
        {
            get
            {
                if (base.Owner.BlackList.Contains(this.Uri))
                {
                    return ImpsPresenceIconsEx.Instance.BlockIcon;
                }
                if (this.Type == ContactType.MobileBuddy)
                {
                    int? relationStatus = this.RelationStatus;
                    if ((relationStatus.GetValueOrDefault() == 0) && relationStatus.get_HasValue())
                    {
                        return ImpsPresenceIconsEx.Instance.WaitingMobileBuddyIcon;
                    }
                    int? nullable2 = this.RelationStatus;
                    if ((nullable2.GetValueOrDefault() == 2) && nullable2.get_HasValue())
                    {
                        return ImpsPresenceIconsEx.Instance.RejectMobileBuddyIcon;
                    }
                    if (this.Presence.IsOffline)
                    {
                        return ImpsPresenceIconsEx.Instance.Offline;
                    }
                    return ImpsPresenceIconsEx.Instance.MobileBuddy;
                }
                if (this.Type == ContactType.ChatFriend)
                {
                    return ImpsPresenceIconsEx.Instance.ChatFriendIcon;
                }
                if (this.Type == ContactType.Vodafone)
                {
                    if (this.Presence.IsOffline)
                    {
                        return ImpsPresenceIconsEx.Instance.VodafoneOffline;
                    }
                    if (this.Presence.IsBusy)
                    {
                        return ImpsPresenceIconsEx.Instance.VodafoneBusy;
                    }
                    return ImpsPresenceIconsEx.Instance.VodafoneOnline;
                }
                int? nullable3 = this.RelationStatus;
                if ((nullable3.GetValueOrDefault() == 0) && nullable3.get_HasValue())
                {
                    return ImpsPresenceIconsEx.Instance.WaitingBuddyIcon;
                }
                int? nullable4 = this.RelationStatus;
                if ((nullable4.GetValueOrDefault() == 2) && nullable4.get_HasValue())
                {
                    return ImpsPresenceIconsEx.Instance.RejectBuddyIcon;
                }
                return this.Presence.Icon;
            }
        }

        public int? RelationStatus
        {
            get
            {
                return this._relationStatus;
            }
            internal set
            {
                int? nullable = this._relationStatus;
                this._relationStatus = value;
                int? nullable2 = nullable;
                int? nullable3 = value;
                if ((nullable2.GetValueOrDefault() != nullable3.GetValueOrDefault()) || (nullable2.get_HasValue() != nullable3.get_HasValue()))
                {
                    FuncDispatcher.InvokeEventHandlerInUiThread(this, this.RelationStatusChanged, EventArgs.Empty);
                }
                this.Presence.UpdateValue();
            }
        }

        public bool RelationStatusIsAgree
        {
            get
            {
                int? relationStatus = this.RelationStatus;
                if (relationStatus.GetValueOrDefault() == 1)
                {
                    return relationStatus.get_HasValue();
                }
                return false;
            }
        }

        public virtual rich_string RichDisplayName
        {
            get
            {
                return null;
            }
        }

        internal bool SubscribePresenceOK
        {
            get
            {
                if (this.CanSubscribedPresence)
                {
                    return this._subscribePresenceOK;
                }
                return true;
            }
            set
            {
                this._subscribePresenceOK = value;
            }
        }

        public int? TotalChatCount
        {
            get
            {
                return this._totalChatCount;
            }
            internal set
            {
                this._totalChatCount = value;
            }
        }

        public abstract ContactType Type { get; }

        public IicUri Uri
        {
            get
            {
                return this._uri;
            }
            internal set
            {
                this._uri = value;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -