private void refreshTexturesListBox()
{
texturesListBox.Items.Clear();
List<Asset> assets = new List<Asset>();
List<Asset> dmas = null;
AssetManager.Instance.AssetsByType.TryGetValue(Asset.Types.DMA, out dmas);
if (dmas != null)
{
assets.AddRange(dmas);
}
assets.Sort(new Asset.NameComparer());
if (assets != null)
{
foreach (Asset asset in assets)
{
if (asset.Name.IndexOf(searchTexturesText.Text, 0, StringComparison.OrdinalIgnoreCase) >= 0)
{
texturesListBox.Items.Add(asset);
}
}
}
Int32 count = texturesListBox.Items.Count;
Int32 max = assets != null ? assets.Count : 0;
modelsCountToolStripStatusLabel.Text = count + "/" + max;
}