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

📄 optionsitem.cs

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

    public class OptionsItem
    {
        private readonly IOptionsManager _manager;
        private readonly string _name;
        private IOptionsControl _oc;
        private readonly string _text;
        private readonly Type _type;
        private static Type _typeOptionsControl = typeof(IOptionsControl);

        public OptionsItem(IOptionsManager manager, string name, string text, Type type)
        {
            if (!_typeOptionsControl.IsAssignableFrom(type))
            {
                throw new ArgumentException("The options item type must implement interface IOptionsControl!", "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 IOptionsControl OptionsControl
        {
            get
            {
                if (this._oc == null)
                {
                    this._oc = this._manager.CreateOptionsControl(this);
                }
                return this._oc;
            }
        }

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

⌨️ 快捷键说明

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