public void refreshList()
        {
            this.Assets.Clear();
            string str = this.filterText.Text.Trim();

            foreach (GameData.Item value in this.nav.ou.gameData.items.Values)
            {
                foreach (KeyValuePair <string, object> keyValuePair in value)
                {
                    if (!(keyValuePair.Value is GameData.File) || string.IsNullOrWhiteSpace(keyValuePair.Value.ToString()))
                    {
                        continue;
                    }
                    GameData.State state = value.getState(keyValuePair.Key);
                    if (state == GameData.State.ORIGINAL && !this.showOriginal.Checked || state == GameData.State.MODIFIED && !this.showModified.Checked)
                    {
                        continue;
                    }
                    AssetList.Asset asset = null;
                    string          str1  = keyValuePair.Value.ToString();
                    if (!string.IsNullOrWhiteSpace(str) && CultureInfo.InvariantCulture.CompareInfo.IndexOf(str1, str, CompareOptions.IgnoreCase) < 0)
                    {
                        continue;
                    }
                    foreach (AssetList.Asset asset1 in this.Assets)
                    {
                        if (asset1.file != str1)
                        {
                            continue;
                        }
                        asset = asset1;
                        goto Label0;
                    }
Label0:
                    if (asset != null)
                    {
                        asset.count++;
                    }
                    else
                    {
                        this.Assets.Add(new AssetList.Asset(keyValuePair.Key, str1, value));
                    }
                }
            }
            this.Assets = (
                from o in this.Assets
                orderby o.file
                select o).ToList <AssetList.Asset>();
            this.view.VirtualListSize = this.Assets.Count <AssetList.Asset>();
            this.view.SelectedIndices.Clear();
            this.itemCache = null;
            base.Invalidate();
        }
        private ListViewItem RetrieveVirtualItem(int index)
        {
            if (this.itemCache != null && index >= this.cacheOffset && index < this.cacheOffset + (int)this.itemCache.Length)
            {
                return(this.itemCache[index - this.cacheOffset]);
            }
            AssetList.Asset item         = this.Assets[index];
            ListViewItem    listViewItem = new ListViewItem()
            {
                Text      = item.file,
                ForeColor = StateColours.GetStateColor(item.item.getState(item.key))
            };

            if (!File.Exists(item.file))
            {
                listViewItem.ForeColor = Color.Red;
            }
            return(listViewItem);
        }