settings.settings

How do I supply extra info to IApplicationSettingsProvider class?

徘徊边缘 提交于 2019-12-01 21:13:57
Perhaps this question has been asked before in a different way, but I haven’t been able to find it. I have one or more plugin adapter assemblies in my application all having the type IPlugin, for instance. Each adapter has its own settings structures stored in a common directory. Whether they are stored in one contiguous file or in separate ones doesn’t matter. Each adapter can have one or more settings associated with it. The settings will have both a name and the Plugin it will be used for. How would I create such a configuration system using the following requirements: I want to use .NETs

Samsung enable disable “Driving mode”

一笑奈何 提交于 2019-12-01 00:32:16
I would like to enable/disable Driving mode which is available on some Samsung devices (Galaxy S2, S3). I know I have to put something to system settings, but I don´t know what. So please advice me what values I should use or where I can find this information. Settings.System.putInt(context.getContentResolver(), "something1", "something2"); Thank you in advance. Sure! This code works for me: Settings.System.putInt(getContentResolver(), "driving_mode_on", 1); // To Enable Settings.System.putInt(getContentResolver(), "driving_mode_on", 0); // To Disable Settings.System.putInt(getContentResolver(

Settings.settings vs. app.config in .NET desktop app [duplicate]

你离开我真会死。 提交于 2019-11-28 15:37:50
Possible Duplicate: What is the difference between app.config file and XYZ.settings file? I am quite confused by the apparent redundancy of these two mechanisms in Visual Studio to store and manage desktop application settings: You can use the XML app.config file, adding items to the <appSettings> section. These can be retrieved from code using the ConfigurationManager class. Alternatively, you can use the Settings.settings file to add individual settings through an editor. Visual Studio will generate a Settings class for type-safe retrieval of settings at run-time. These two mechanisms seem

Trouble saving a collection of objects in Application Settings

房东的猫 提交于 2019-11-28 11:13:37
I'm trying to store a collection of custom objects in the Application Settings. With some help from this related question , here is what I currently have: // implementing ApplicationSettingsBase so this shows up in the Settings designer's // browse function public class PeopleHolder : ApplicationSettingsBase { [UserScopedSetting()] [SettingsSerializeAs(System.Configuration.SettingsSerializeAs.Xml)] public ObservableCollection<Person> People { get; set; } } [Serializable] public class Person { public String FirstName { get; set; } } public MainWindow() { InitializeComponent(); // AllPeople is

How do I supply extra info to IApplicationSettingsProvider class?

最后都变了- 提交于 2019-11-28 09:36:22
问题 Perhaps this question has been asked before in a different way, but I haven’t been able to find it. I have one or more plugin adapter assemblies in my application all having the type IPlugin, for instance. Each adapter has its own settings structures stored in a common directory. Whether they are stored in one contiguous file or in separate ones doesn’t matter. Each adapter can have one or more settings associated with it. The settings will have both a name and the Plugin it will be used for.

How to persist changes in a .settings/.config file across a file version change?

坚强是说给别人听的谎言 提交于 2019-11-28 03:48:42
I have created an application that uses settings.settings to store some user specific settings (scope=User). Settings are loaded correctly on startup, changed during use and saved correctly for next launch. This cycle appears to have no problems. The problem arises when I update the assembly and file versions for a new build. The settings are no longer loaded on startup (instead the default values are used). It also appears that a config file saved from version 1.1 will persist even if version 1.2 is launched and a NEW config file is generated and saved too (i.e. you can relaunch version 1.1

How to persist changes in a .settings/.config file across a file version change?

独自空忆成欢 提交于 2019-11-27 09:40:24
问题 I have created an application that uses settings.settings to store some user specific settings (scope=User). Settings are loaded correctly on startup, changed during use and saved correctly for next launch. This cycle appears to have no problems. The problem arises when I update the assembly and file versions for a new build. The settings are no longer loaded on startup (instead the default values are used). It also appears that a config file saved from version 1.1 will persist even if

Settings.settings vs. app.config in .NET desktop app [duplicate]

坚强是说给别人听的谎言 提交于 2019-11-27 09:15:42
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: What is the difference between app.config file and XYZ.settings file? I am quite confused by the apparent redundancy of these two mechanisms in Visual Studio to store and manage desktop application settings: You can use the XML app.config file, adding items to the <appSettings> section. These can be retrieved from code using the ConfigurationManager class. Alternatively, you can use the Settings.settings file to