private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { currentNode = treeView1.SelectedNode.Text; tbl = new DataTable(); tbl.Columns.Add(new DataColumn("Name") { ReadOnly = true }); tbl.Columns.Add("Value"); dataGridView1.DataSource = tbl; tbl.Rows.Clear(); selectedBone = VBN.bone(treeView1.SelectedNode.Text); tbl.Rows.Add("Bone Index", VBN.getJTBIndex(treeView1.SelectedNode.Text)); tbl.Rows.Add("Bone Hash", ((Bone)treeView1.SelectedNode).boneId.ToString("X")); tbl.Rows.Add("Bone Type", VBN.bone(treeView1.SelectedNode.Text).boneType); tbl.Rows.Add("X Pos", ((Bone)treeView1.SelectedNode).position[0]); tbl.Rows.Add("Y Pos", ((Bone)treeView1.SelectedNode).position[1]); tbl.Rows.Add("Z Pos", ((Bone)treeView1.SelectedNode).position[2]); tbl.Rows.Add("X Rot", ((Bone)treeView1.SelectedNode).rotation[0]); tbl.Rows.Add("Y Rot", ((Bone)treeView1.SelectedNode).rotation[1]); tbl.Rows.Add("Z Rot", ((Bone)treeView1.SelectedNode).rotation[2]); tbl.Rows.Add("X Scale", ((Bone)treeView1.SelectedNode).scale[0]); tbl.Rows.Add("Y Scale", ((Bone)treeView1.SelectedNode).scale[1]); tbl.Rows.Add("Z Scale", ((Bone)treeView1.SelectedNode).scale[2]); numericUpDown1.Value = (decimal)((Bone)treeView1.SelectedNode).position[0]; numericUpDown2.Value = (decimal)((Bone)treeView1.SelectedNode).position[1]; numericUpDown3.Value = (decimal)((Bone)treeView1.SelectedNode).position[2]; VBN.reset(); Runtime.selectedBoneIndex = VBN.bones.IndexOf((Bone)treeView1.SelectedNode); }