示例#1
0
		/// <summary>
		///     Applies the filter for the entry.
		/// </summary>
		/// <param name="filter">The filter.</param>
		public override void ApplyFilter(PropertyFilter filter)
		{
			var 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);
		}
示例#2
0
		private static bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry)
		{
			entry.ApplyFilter(filter);
			return entry.MatchesFilter;
		}
示例#3
0
文件: GridEntry.cs 项目: stewmc/vixen
		/// <summary>
		///     Applies the filter for the entry.
		/// </summary>
		/// <param name="filter">The filter.</param>
		public abstract void ApplyFilter(PropertyFilter filter);
示例#4
0
文件: GridEntry.cs 项目: stewmc/vixen
		/// <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));
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyFilterAppliedEventArgs"/> class.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public PropertyFilterAppliedEventArgs(PropertyFilter filter)
 {
     Filter = 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;
		}