Settings.settings 并输出到数组

发布于 2024-10-08 14:50:01 字数 186 浏览 0 评论 0原文

我目前有一个带有大约 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北城孤痞 2024-10-15 14:50:01

我建议采用不同的方法:在设置文件中创建一个 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 that ArrayList 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文