2006-02-06, 03:57 PM
I need some help with making my GBPVR SkinTools code more efficient - perhaps with reflection or generics to make the methods more reusable with different types.
Currently, I have code like this:
but I'd really like to have code something like this:
I actually found code to accomplish the first part, but it errors out when I try to add the node position.
Anyone know how to do this?
Thanks in advance.
gruskada
Currently, I have code like this:
Code:
switch(e.Node.Parent.Name) {
case "TextStyles":
propertyGrid.SelectedObject = workingSkin.TextStyles[nodePosition];
break;
case "NamedColors":
...
but I'd really like to have code something like this:
Code:
propertyGrid.SelectedObject = workingSkin[passedInObjectName][nodePosition];
I actually found code to accomplish the first part, but it errors out when I try to add the node position.
Anyone know how to do this?
Thanks in advance.
gruskada