protected override void DoFilter() { base.DoFilter(); if (!string.IsNullOrEmpty(CategoryFilter) || FilterByMarketCategory) { FilteredCollection = new ObservableCollection <DomainObjectViewModel <Item> >( FilteredCollection.Where(p => (string.IsNullOrEmpty(CategoryFilter) || (!string.IsNullOrEmpty(p.DomainObject.Category) && p.DomainObject.Category.ToLower().Contains(CategoryFilter.ToLower()))) && (!FilterByMarketCategory || p.DomainObject.MarketCategory == MarketCategoryFilter)) .OrderBy(p => p.DomainObject.Name)); } }
private void OnBlockerTransparencyChanged(Component sender, EventArgs @event) { var position = sender.Entity.Get <GameObject>().Location; Cells[position.X, position.Y].Transparent = _blockers.Where(e => e.Get <GameObject>().Location == position).All(e => e.Get <Scenery>().Transparent); }