示例#1
0
		protected virtual void OnSelected(ItemListEventArgs args)
		{
			if (Selected != null)
				Selected.Invoke(this, args);
		}
示例#2
0
		private void OnFiltering(ItemListEventArgs args)
		{
			if (Filtering != null)
				Filtering.Invoke(this, args);

			if (Filters != null)
				foreach (ItemFilter filter in Filters)
					filter.Filter(args.Items);
		}
示例#3
0
		private ItemList GetItems()
		{
			ItemListEventArgs args = new ItemListEventArgs(null);
			OnSelecting(args);

			if (CurrentItem != null && args.Items == null)
				args.Items = new ItemList(PartsAdapter.GetParts(CurrentItem, ZoneName, GetInterface()));

			OnSelected(args);
			OnFiltering(args);
			return args.Items;
		}