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

📄 crbtcollection.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Core
{
    using System;
    using System.Collections;
    using System.Collections.Generic;

    public class CrbtCollection : ICollection<CrbtToBuddy>, IEnumerable<CrbtToBuddy>, IEnumerable
    {
        private ICollection<CrbtToBuddy> _col = new List<CrbtToBuddy>();

        public void Add(CrbtToBuddy item)
        {
            if (!this.Contains(item))
            {
                this._col.Add(item);
            }
        }

        public void Clear()
        {
            this._col.Clear();
        }

        public bool Contains(CrbtToBuddy item)
        {
            return this._col.Contains(item);
        }

        public void CopyTo(CrbtToBuddy[] array, int arrayIndex)
        {
            throw new NotSupportedException();
        }

        public CrbtToBuddy FindCrbt(string code)
        {
            using (IEnumerator<CrbtToBuddy> enumerator = this._col.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    CrbtToBuddy buddy = enumerator.get_Current();
                    if (buddy.ToneCode.CompareTo(code) == 0)
                    {
                        return buddy;
                    }
                }
            }
            return null;
        }

        public IEnumerator<CrbtToBuddy> GetEnumerator()
        {
            return this._col.GetEnumerator();
        }

        public bool Remove(CrbtToBuddy item)
        {
            if (this._col.Contains(item))
            {
                return this._col.Remove(item);
            }
            return false;
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }

        public int Count
        {
            get
            {
                return this._col.get_Count();
            }
        }

        public bool IsReadOnly
        {
            get
            {
                return this._col.get_IsReadOnly();
            }
        }
    }
}

⌨️ 快捷键说明

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