Пример #1
0
        private bool CanResetValue(IEnumerable <object> items, PropertyDescriptor descriptor)
        {
            if (descriptor != null && !descriptor.IsReadOnly)
            {
                foreach (object item in items)
                {
                    if (descriptor.CanResetValue(item))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Пример #2
0
        /// <summary>
        /// Tests if the value can be reset for the specified component</summary>
        /// <param name="component">Component for which the value is to be reset</param>
        /// <returns>True iff the value can be reset for the specified component</returns>
        public override bool CanResetValue(object component)
        {
            SysPropertyDescriptor descriptor = FindDescriptor(component);

            return(descriptor != null && descriptor.CanResetValue(component));
        }
Пример #3
0
        private bool CanResetValue(IEnumerable<object> items, PropertyDescriptor descriptor)
        {
            if (descriptor != null && !descriptor.IsReadOnly)
            {
                foreach (object item in items)
                    if (descriptor.CanResetValue(item))
                        return true;
            }

            return false;
        }