I fixed it by using an XML editor which allows to read and write to any XML file, with this I can make a custom settings file. Thank you all for your help :).
VS2012 Exporting the "User Settings"
-
12-01-2022 - |
Question
I am trying to find a good system to store settings that can be changed by the user.
I've tried to use an .ini
file but with this I can't seem to save and load some values, like colors.
I've also tried to use XML
, but that slowed me down so much to a point that it became useless.
I wanted to know if it's possible to export the Settings.settings
from the Properties project. If so, how to export to an XML
file?
Here is some code I use to call the settings
button1.BackColor = Properties.Settings.Default.ColorINFO;
button2.BackColor = Properties.Settings.Default.ColorWARNING;
button3.BackColor = Properties.Settings.Default.ColorServer;
Here is the code I use to save the settings
Properties.Settings.Default.ColorINFO = button1.BackColor;
Properties.Settings.Default.ColorWARNING = button2.BackColor;
Properties.Settings.Default.ColorServer = button3.BackColor;
Properties.Settings.Default.Save();
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow