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

📄 profilenavitem.cs

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

    public class ProfileNavItem
    {
        private readonly IProfileManager _manager;
        private readonly string _name;
        private IProfileControl _oc;
        private readonly string _text;
        private readonly Type _type;
        private static Type _typeControl = typeof(Control);
        private static Type _typeProfileNavControl = typeof(IProfileControl);

        public ProfileNavItem(IProfileManager manager, string name, string text, Type type)
        {
            if (!_typeProfileNavControl.IsAssignableFrom(type) || !_typeControl.IsAssignableFrom(type))
            {
                throw new ArgumentException("The item type must inherit from Control and implement interface IProfileNavControl!", "type");
            }
            this._manager = manager;
            this._name = name;
            this._text = text;
            this._type = type;
        }

        public bool ControlAvailable
        {
            get
            {
                return (null != this._oc);
            }
        }

        public Type ControlType
        {
            get
            {
                return this._type;
            }
        }

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

        public IProfileControl ProfileNavControl
        {
            get
            {
                if (this._oc == null)
                {
                    this._oc = this._manager.CreateProfileControl(this);
                }
                return this._oc;
            }
        }

        public string Text
        {
            get
            {
                return this._text;
            }
        }
    }
}

⌨️ 快捷键说明

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