okay this is driving me nut and it is probably such a simple solution
but for the life of me i can't figure out what i'm doing wrong
okay i have the following code
Properties.Settings.Default.ShowAdvanced = this.tsbAdvancedMode.Checked;
Properties.Settings.Default.Save();
now i ththought that this was the way to save a setting to the config file, but it didn't.
to test it i did this
MessageBox.Show(Properties.Settings.Default.ShowAdvanced.ToString());
Properties.Settings.Default.ShowAdvanced = this.tsbAdvancedMode.Checked;
MessageBox.Show(Properties.Settings.Default.ShowAdvanced.ToString());
Properties.Settings.Default.Save();
Properties.Settings.Default.Reload();
MessageBox.Show(Properties.Settings.Default.ShowAdvanced.ToString());
the output was 3 message boxes
true
false
false
which is the expected output
so i close the app down open the config and it's still true
so what have i missed
ShowAdvanced is scoped as user
Loading
MichaelPosted Jun 6, 2008, 6:59 AM
MichaelPosted Jun 6, 2008, 6:51 AM
MichaelPosted Jun 6, 2008, 6:03 AM
Posted Jun 5, 2008, 8:38 PM
C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\NAMEOFAPPLICATION
Look in there and see if you can see a "user.config" file. If you see it, that is where the settings are being stored for the application.
Persistant storage is a nice feature for a few good reasons:
Its out of the way of most user interaction.
The application always knows where its at.
The settings are somewhat permanent. Meaning that if you uninstall and reinstall the application, the settings will still be there and you wont need to reconfigure.
Hope this helps =)
MichaelPosted Jun 5, 2008, 8:05 AM