void TableView_TextureCategorySelected(object selected, int col) { TextureCategoryItem item = selected as TextureCategoryItem; if (item != null) { _selectedCategory = (TextureCategory)item.TextureCat; RefreshTextureInfoTables(); } }
private void ShowCategory(TextureCategory cat) { // Clear events to allow GC to collect the view foreach (Control c in panelMaterials.Controls) ((MaterialView)c).ViewSelected -= view_ViewSelected; panelMaterials.Controls.Clear(); foreach (var file in cat.directory.files) { MaterialView view = MaterialView.FromVFSFile(file.Name); if (view != null) { view.ViewSelected += new EventHandler(view_ViewSelected); view.SetSize(SelectedDisplaySize); panelMaterials.Controls.Add(view); } } }
public bool IsInCategory(TextureCategory category) { return(Categories != null && Categories.ToList().Contains(category)); }