c# - Issue reading updated value of settings (app.config) -
i created settings in winforms app this: link
you can see have timer interval value there. goal inside timer here:
{ // inside timer tick handler .... { timer1.stop(); int tinterval = properties.settings.default.timerinterval; helpermethods.appendtologfile(tinterval.tostring(), logtype.information); timer1.interval = tinterval; timer1.start(); } }
i want change interval value of timer on runtime.
but when launch application if change interval inside app.config file (opened windows explorer), still old value being read inside timer above. doing wrong?
edit: doesn't work, if close application, , start again (i.e. restart application). still reads old values app.config
(not ones entered after application shutdown , before application opened). getting wrong?
ps. culprit maybe here, please see - reads old value 1500, instead of 2000. can see how vs saying (after closed , reopened project) settings file still has old value, going on here?
assuming have default settings applied, configuration file settings
saved in user directory, not application directory. you're editing wrong file. that's because scope
value set user
in settings editor in visual studio.
try finding application's configuration in appdata
(usually local\yourcorporation\application_version
or that).
Comments
Post a Comment