Exemplo n.º 1
0
    void TableView_TextureCategorySelected(object selected, int col)
    {
        TextureCategoryItem item = selected as TextureCategoryItem;

        if (item != null)
        {
            _selectedCategory = (TextureCategory)item.TextureCat;

            RefreshTextureInfoTables();
        }
    }
Exemplo n.º 2
0
		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);
				}
			}
		}
Exemplo n.º 3
0
 public bool IsInCategory(TextureCategory category)
 {
     return(Categories != null && Categories.ToList().Contains(category));
 }