private void MainTreeView_AfterSelect(object sender, TreeViewEventArgs e)
{
// KFreon: Populate MainListView and change icons etc in MainTreeView
MainListView.BeginUpdate();
MainListView.Items.Clear();
myTreeNode locTree = e.Node as myTreeNode;
int i = 0;
//foreach (Textures.ITexture2D tex in locTree.textures)
for (int j = 0; j < locTree.TexInds.Count; j++)
{
TreeTexInfo tex = Tree.GetTex(locTree.TexInds[j]);
ListViewItem it = new ListViewItem("", 0);
it.Text = tex.TexName;
it.Name = i.ToString();
tex.ListViewIndex = MainListView.Items.Count;
//Tree.ReplaceTex(locTree.TexInds[j], tex);
MainListView.Items.Add(it);
i++;
}
MainListView.EndUpdate();
// KFreon: Populate properties tab
PropertiesRTB.Text = "Tree Node: " + e.Node.Name + Environment.NewLine;
int line1length = PropertiesRTB.TextLength;
// KFreon: Count number of textures in node
int count = locTree.NodeTextureCount();
if (locTree.TexCount == 0)
locTree.TexCount = count;
PropertiesRTB.Text += "Contains: " + count;
PCCsCheckedListBox.Items.Clear();
// KFreon: Load thumbnails
ListViewImageList.Images.Add(Image.FromFile(ExecFolder + "Placeholder.ico")); // This is the old image seen in the list
UpdateThumbnailDisplays(e.Node as myTreeNode);
}