コード例 #1
0
        /// <summary>
        /// Called when filter was applied for the entry.
        /// </summary>
        /// <param name="filter">The filter.</param>
        protected virtual void OnFilterApplied(PropertyFilter filter)
        {
            var handler = FilterApplied;

            if (handler != null)
            {
                handler(this, new PropertyFilterAppliedEventArgs(filter));
            }
        }
コード例 #2
0
        /// <summary>
        /// Applies the filter for the entry.
        /// </summary>
        /// <param name="filter">The filter.</param>
        public override void ApplyFilter(PropertyFilter filter)
        {
            bool propertiesMatch = false;

            foreach (var entry in Properties)
            {
                if (PropertyMatchesFilter(filter, entry))
                {
                    propertiesMatch = true;
                }
            }

            HasVisibleProperties = _properties.Any(IsVisibleProperty);
            MatchesFilter        = propertiesMatch;

            if (propertiesMatch && !IsExpanded)
            {
                IsExpanded = true;
            }

            OnFilterApplied(filter);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyFilterAppliedEventArgs"/> class.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public PropertyFilterAppliedEventArgs(PropertyFilter filter)
 {
     Filter = filter;
 }
コード例 #4
0
 private static bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry)
 {
     entry.ApplyFilter(filter);
     return(entry.MatchesFilter);
 }
コード例 #5
0
 /// <summary>
 /// Applies the filter for the entry.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public override void ApplyFilter(PropertyFilter filter)
 {
     this.MatchesFilter = (filter == null) || filter.Match(this);
     this.OnFilterApplied(filter);
 }
コード例 #6
0
 /// <summary>
 /// Applies the filter for the entry.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public abstract void ApplyFilter(PropertyFilter filter);