用户设置更改不可见 [英] User Settings change not visible

查看:312
本文介绍了用户设置更改不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了一些用户设置,在运行时更改它们并保存它们。

更改被接受所以当我再次启动程序时,变量会被更改(例如我更改了字符串,当我运行app时再次字符串被更改了。

问题是,当我查看设置时,总是会在开始时添加值,但是当我运行程序时,我有新的变量。

可以变量是保存的,以便我可以在用户设置中看到新的变量?

I added some user settings, change them in runtime and saved them.
Change is accepted so when I start program again, variables are changed (for example I changed string, and when I run app again string is changed).
Problem is when I look at the settings there are always values I added in begining, althoug when I run program I have new variables.
Can variables be saves so that I can see new ones in user settings?

推荐答案

如果您使用应用程序范围进行设置,则无法在运行时更改设置。



其次,如果您通过在Visual Studio中编译从Debug目录运行,它将在每次编译和运行时用项目中的一个覆盖您的设置文件。这样做是因为它必须重新生成用于访问文件的Settings类。
If you are using the Application scope for your settings, the settings cannot be changed at run time.

Second, if you are running from the Debug directory by compiling in Visual Studio, it will overwrite your settings file with the one from your project each time you compile and run. It does this because it has to re-generate the Settings class you use to access the file.


这篇关于用户设置更改不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆