扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:陶刚编译 来源:天极网 2007年11月4日
关键字:
private void PopulateListView() { ListViewItem item = null; this.buttonUpdateSetting.Enabled = false; this.textBoxSettingValue.Enabled = false; this.listViewSettings.Items.Clear(); Properties.Settings settings = Properties.Settings.Default; foreach (SettingsProperty property in settings.Properties) { bool match = false; switch (_dt) { case DisplayType.All: match = true; break; case DisplayType.Application: foreach (System.Collections.DictionaryEntry attribute in property.Attributes) { if (attribute.Value is System.Configuration.ApplicationScopedSettingAttribute) { match = true; break; } } break; case DisplayType.User: foreach (System.Collections.DictionaryEntry attribute in property.Attributes) { if (attribute.Value is System.Configuration.UserScopedSettingAttribute) { match = true; break; } } break; } if (match) { item = new ListViewItem(property.Name); item.SubItems.Add(new ListViewItem.ListViewSubItem(item, property.PropertyType.ToString())); item.SubItems.Add(new ListViewItem.ListViewSubItem(item, settings[item.Text] as string)); item.Tag = property; this.listViewSettings.Items.Add(item); } } } |
![]() 图6:改变User范围的设置信息 |
![]() 图7:新的用户配置文件:.NET框架组件保存的示例应用程序的新的用户配置文件的位置 |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者