private void RefreshCompound() { if (allItems != null) { gvFiles.DataSource = null; currentItems = allItems.ToList(); CompoundItemFilter filter = GetInvalidFilter(); currentItems.RemoveAll(m => filter(m)); gvFiles.DataSource = currentItems; } }
public static CompoundItemFilter GetRejectCompoundFilter(this SrmViewOption option) { CompoundItemFilter result = null; if (!option.ViewDecoy) { result += new CompoundItemFilter(CompoundItemUtils.IsDecoy); } if (option.ViewValidOnly) { result += new CompoundItemFilter(CompoundItemUtils.IsInvalid); } if (result == null) { result += new CompoundItemFilter(CompoundItemUtils.AlwaysFalse); } return(result); }
public List <CompoundItem> GetCompounds(CompoundItemFilter reject) { return((from c in _compounds where !reject(c) select c).ToList()); }