Thread: using app config to create a dynamic menu

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    1

    using app config to create a dynamic menu

    Hi,

    I'm trying to create a menu that shows the user a list of options. The options can be added to via the app config file.

    right now I am using an enum to print the menu but I want to know if I can read the app config file to create it, in case the list has been added to.

    that way I know the menu is allways updated.

  2. #2
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Short answer is yes. I'm sorry I cant help you much more. Closest I know to C# is java, check out how to parse text from files and load the content to your 'menu item' objects. C# probably supports loading object data from XML files, which is quite an easy way to go around things if you are loading multiple varibles for each object (although XML bloats the files quite alot).

  3. #3
    Registered User
    Join Date
    Apr 2008
    Location
    USA
    Posts
    24

    Lightbulb

    Your best bet is to learn how to add and reference resource files in VS Express or what ever license version you have, if any.

    What you want to do could be achieved using an XML resource file that could be considered to be very much like an .ini/initialization file.

    MSDN online/Express Ed. will certainly have some info. regarding this topic. You may also want to visit "The Code Project" online and access their C# oriented resources. There are plenty of resources and examples out there regarding the topic ranging from ini. system startup, to internationalization using XML resource files to streamline the process.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Delet Frequency in linked list
    By swishiat.com in forum C Programming
    Replies: 16
    Last Post: 12-13-2003, 02:05 AM
  2. Dynamic Toolbars
    By nvoigt in forum Windows Programming
    Replies: 1
    Last Post: 01-11-2002, 10:21 AM
  3. Menu Items in a dialog app MSVC++
    By jinx in forum Windows Programming
    Replies: 1
    Last Post: 10-19-2001, 01:44 AM
  4. SDI Menu App - MSVC 6
    By Unregistered in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2001, 09:59 PM