Sign in to follow this  
LostAgain

[.net] User Interface designer

Recommended Posts

I'm a player of a popular online role playing game and i desided to write an user interface builder so that i could customize my ui easilly and quickly. now i know how the xml file is supposed to look and i'm comfortable with windows user drawn overloading so thats not an issue. heres my issue though: i have three sections on the form a treeview on the left a tabbed window control that contains two items an xml view of the document and a window container control in the center (to display the ui) thinking probably picture box? and a listview 'properties' box on the right hand side. what i want to do is have an internal collection of windows that have information pertaining to the game ui windows based off of the loaded xml files. load the treeview with all the components from the internal window collection. once a item on the treeview is selected the window container control in the center displays the ui and draws a blinking 'selected item' highlight around the ui element that is selected. at the same time it should load all the modifiable properties in the properties listview on the right hand side so they can be modified and saved as the ui is updated. this way you can enter values, modify with cursor, or directly edit the xml code. my problem is two fold. part one: i am trying to deside on a high lvl design for the system. thinking a collection of ui object and using a bridge pattern to develop multiple views for the ui window / property window / xml view. part two: say i have properly populated the tree view on the left hand side. is there any way to fire an event based of the node that is selected besides using AfterSelect? aka an event that i can fire thats specific to each node then i can create subroutines for property selection based of the node selected some will be guages some will be labels some will be sub windows etc. I woud rather use this instead of some giant monolithic if switch case statement within an AfterSelect event. any ideas?

Share this post


Link to post
Share on other sites
Create your own TreeNode class for the types of controls you want and use them to populate the TreeView. You can write the specific code you need for the type of control in the AfterSelect event of each derived class.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this