private void ApplyFilter(HistoryFilter filter) { if (allHistoryItems != null && allHistoryItems.Length > 0) { IEnumerable <HistoryItem> historyItems = filter.ApplyFilter(allHistoryItems); AddHistoryItems(historyItems.ToArray()); } }
private void ApplyFilter(HistoryFilter filter) { if (allHistoryItems != null && allHistoryItems.Length > 0) { IEnumerable <HistoryItem> historyItems = filter.ApplyFilter(allHistoryItems); filteredHistoryItems = historyItems.ToArray(); UpdateTitle(filteredHistoryItems); listViewCache = null; listViewCacheStartIndex = 0; lvHistory.VirtualListSize = 0; if (filteredHistoryItems.Length > 0) { lvHistory.VirtualListSize = filteredHistoryItems.Length; lvHistory.SelectedIndices.Add(0); } } }