Пример #1
0
        /// <summary>
        /// Initialize a new instance of the <see cref="FilteredFileNameEditorAttribute"/> class with the <see cref="Type"/> containing the resources and the resource key.
        /// </summary>
        /// <param name="resourceType">The <see cref="Type"/> containing the resources.</param>
        /// <param name="resourceKey">The resource key.</param>
        public FilteredFileNameEditorAttribute(Type resourceType, string resourceKey)
        {
            if (null == resourceType)
            {
                throw new ArgumentNullException("resourceType");
            }

            this.filter = ResourceStringLoader.LoadString(resourceType.FullName, resourceKey, resourceType.Assembly);;
        }
Пример #2
0
 /// <summary>
 /// Gets the localized string based on the key.
 /// </summary>
 /// <param name="value">The key to the string resources.</param>
 /// <returns>The localized string.</returns>
 protected override string GetLocalizedString(string value)
 {
     return(ResourceStringLoader.LoadString(resourceType.FullName, value, resourceType.Assembly));
 }