Settings.settings 并输出到数组
我目前有一个带有大约 20 个选项卡的选项卡控件,我希望为每个选项卡提供一个真/假值,该值保存在 Settings.settings 文件中,以便可以在表单加载时调用它,并且只显示具有真值的选项卡与他们作对。
有谁知道如何将 Settings.settings 文件的内容输出到数组,以便我可以对每个保存的值执行 a ?
谢谢
I currently have a tab control with around 20 tabs and im looking to give each one of them a true / false value that is saved in the Settings.settings file so it can be called at the form load and only display tabs with a true value set against them.
Does anyone know how to output the contents of the Settings.settings file to an array so i can perform a for each on the saved values?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议采用不同的方法:在设置文件中创建一个
ArrayList
设置,并将各个选项卡设置存储在该ArrayList
中,然后迭代它。对我来说,迭代单个设置似乎比创建 20 个(将来可能更多)单独设置并迭代它们要简单得多。I would suggest a different approach: Create a setting in your settings file that is an
ArrayList
and store your individual tabs settings in thatArrayList
and iterate it. To me, it seems a lot simpler to iterate a single setting, rather than creating 20 (and maybe more in the future) individual settings and iterating them.