Application Settings “Profiles”?

廉价感情. 提交于 2019-12-25 08:48:26

问题


I am using this method to store settings for my program. I want the user to be able to choose and load different application settings at run time. (i.e. the user may want to load one group of settings for one scenario, and another group of settings for another). Can anyone recommend the best way to go about this? Do I need to use another method to read/write the profiles from disk to Settings.Default, or is it possible to use multiple instances of what I am using now without having to rename the files and re-launch the program (this is how I am achieving my goal now, but I'm sure there's a better/easier way).


回答1:


It appears Bernd Linde's method of using a separate class to manage the profiles is most appropriate. It seems there is no efficient dynamic way to use Settings.settings to load data at run time so it must be handled separately.



来源:https://stackoverflow.com/questions/29347540/application-settings-profiles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!