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

📄 sharecontentcollection.cs

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

    public class ShareContentCollection : IEnumerable<ShareContent>, IEnumerable
    {
        private List<ShareContent> _col;
        private Dialog _dialog;

        internal ShareContentCollection(Dialog dialog)
        {
            this._dialog = dialog;
            this._col = new List<ShareContent>();
        }

        public void Add(ShareContent item)
        {
            this._col.Add(item);
        }

        public void Add(ShareContent item, bool raiseevent)
        {
            this.Add(item);
            if (raiseevent)
            {
                this._dialog.RaiseAddShareContent(new ShareContentEventArgs(item));
            }
        }

        public void Clear()
        {
            for (int i = this._col.get_Count() - 1; i >= 0; i--)
            {
                this.Remove(this._col.get_Item(i));
            }
        }

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

        public void Remove(ShareContent item)
        {
            if (this._col.Contains(item))
            {
                if (!item.IsClosed)
                {
                    item.Close();
                }
                this._col.Remove(item);
                this._dialog.RaiseRemoveShareContent(new ShareContentEventArgs(item));
            }
        }

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

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

        public ShareContent this[int index]
        {
            get
            {
                return this._col.get_Item(index);
            }
        }
    }
}

⌨️ 快捷键说明

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