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

📄 systemfixedcontactgroup.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Pc.BizControls
{
    using Imps.Client.Core;
    using System;
    using System.Runtime.CompilerServices;

    public class SystemFixedContactGroup
    {
        private ContactCollection _contacts;
        private int _id;
        private IsBelongDelegete _isBelong;
        private string _name;
        private User _owner;
        private int _sortIndex;

        public event EventHandler InfoChanged;

        public SystemFixedContactGroup(User owner, int id, string name, int sortIndex, IsBelongDelegete isBelongDelegete)
        {
            this._owner = owner;
            this._isBelong = isBelongDelegete;
            this._name = name;
            this._id = id;
            this._sortIndex = sortIndex;
            this._contacts = new ContactCollection();
        }

        public bool IsBelong(Contact contact)
        {
            if (this._isBelong != null)
            {
                return this._isBelong(contact);
            }
            return false;
        }

        public bool UpdateBelong(Contact contact)
        {
            if (this.IsBelong(contact))
            {
                if (this.Contacts[contact.Uri.Raw] == null)
                {
                    this.Contacts.Add(contact);
                    if (this.InfoChanged != null)
                    {
                        this.InfoChanged(this, EventArgs.Empty);
                    }
                }
                return true;
            }
            if (this.Contacts[contact.Uri.Raw] != null)
            {
                this.Contacts.Remove(contact);
                if (this.InfoChanged != null)
                {
                    this.InfoChanged(this, EventArgs.Empty);
                }
            }
            return false;
        }

        public ContactCollection Contacts
        {
            get
            {
                return this._contacts;
            }
        }

        public int Id
        {
            get
            {
                return this._id;
            }
        }

        public string Name
        {
            get
            {
                return this._name;
            }
        }

        public User Owner
        {
            get
            {
                return this._owner;
            }
        }

        public int SortIndex
        {
            get
            {
                return this._sortIndex;
            }
        }

        public delegate bool IsBelongDelegete(Contact contact);
    }
}

⌨️ 快捷键说明

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