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

📄 designutil.cs

📁 浏览器端看到树型目录结构,用户可以完整地看到像windows资源管理器一样的效果
💻 CS
字号:
//------------------------------------------------------------------------------
// Copyright (c) 2000-2003 Microsoft Corporation. All Rights Reserved.
//------------------------------------------------------------------------------

namespace Microsoft.Web.UI.WebControls.Design
{
    using System;
    using System.ComponentModel;

    /// <summary>
    ///  Utility class with various useful static functions.
    /// </summary>
    internal class DesignUtil
    {
        private static System.Resources.ResourceManager _ResourceManager = null;

        internal static System.Resources.ResourceManager GetResourceManager()
        {
            if (_ResourceManager == null)
            {
                Type ourType = typeof(DesignUtil);
                _ResourceManager = new System.Resources.ResourceManager(ourType.Namespace, ourType.Module.Assembly);
            }

            return _ResourceManager;
        }

        internal static string GetStringResource(string name)
        {
            return (string)GetResourceManager().GetObject(name);
        }

        /// <summary>
        /// Given an object and a property name, retrieves the property descriptor.
        /// </summary>
        /// <param name="obj">The source object</param>
        /// <param name="propName">The property name</param>
        /// <returns>The PropertyDescriptor of the property on the object, or null if not found.</returns>
        internal static PropertyDescriptor GetPropertyDescriptor(object obj, string propName)
        {
            PropertyDescriptorCollection props = TypeDescriptor.GetProperties(obj);

            if (props != null)
            {
                foreach (PropertyDescriptor propDesc in props)
                {
                    if (propDesc.Name == propName)
                    {
                        return propDesc;
                    }
                }
            }

            return null;
        }
    }
}

⌨️ 快捷键说明

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