WPF settings grouping

Page 1 of 1

0 Replies - 8151 Views - Last Post: 26 May 2013 - 09:12 AM Rate Topic: -----

#1 CasiOo  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1575
  • View blog
  • Posts: 3,541
  • Joined: 05-April 11

WPF settings grouping

Posted 26 May 2013 - 09:12 AM

Right now I'm having my settings in the Settings.settings file which generates a Settings class together with writing in the app.config
A setting example
<?xml version="1.0" encoding="utf-8" ?>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="GW2_API_Project.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
            <setting name="GW2API_WvW_Matches" serializeAs="String">
            <setting name="GW2API_WvW_MatchDetails" serializeAs="String">
            <setting name="GW2API_WvW_ObjectiveNames" serializeAs="String">
            <setting name="GW2API_DynamicEvents_Events" serializeAs="String">
            <setting name="GW2API_DynamicEvents_EventNames" serializeAs="String">
            <setting name="GW2API_DynamicEvents_MapNames" serializeAs="String">
            <setting name="GW2API_DynamicEvents_WorldNames" serializeAs="String">

And how I use it in my code
WSResponse reponse = ws.PostRequest(Properties.Settings.Default.GW2API_WvW_Matches);

I want to group all the GW2 settings together, so that when there are more settings, they won't all be clumped up and messy
In code (Not working code) I would want something like
String url = Properties.Settings.Default.GW2API.WvW.Matches

I can't figure out how to do it
Also I think it would be preferred to have a separated config file just for the GW2 API settings

Is This A Good Question/Topic? 0
  • +

Page 1 of 1