예제 #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;
		}