settings.settings

Samsung enable disable “Driving mode”

若如初见. 提交于 2020-01-29 09:53:49
问题 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. 回答1: Sure! This code works for me: Settings.System.putInt(getContentResolver(), "driving_mode_on", 1); // To Enable Settings.System

Samsung enable disable “Driving mode”

╄→尐↘猪︶ㄣ 提交于 2020-01-29 09:53:06
问题 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. 回答1: Sure! This code works for me: Settings.System.putInt(getContentResolver(), "driving_mode_on", 1); // To Enable Settings.System

C# - Compiler Error: System.Configuration.ConfigurationErrorsException was unhandled

◇◆丶佛笑我妖孽 提交于 2020-01-16 03:28:41
问题 Hey Everyone, How do I fix the Compiler Error upon compiling on " return ((string)(this["TargetDir"])); ": System.Configuration.ConfigurationErrorsException was unhandled Configuration system failed to initialize {"Unrecognized configuration section userSettings/CCP.Settings1. (C:\\Users\\bmccarthy\\Documents\\Visual Studio 2008\\Projects\\CCP Utility\\CCP Utility\\bin\\Debug\\CCP_Utility.exe.config line 21)"} A first chance exception of type 'System.Configuration.ConfigurationErrorsException

Saving user scoped settings (ApplicationSettingsBase)

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 20:24:54
问题 I am trying to get my application settings to save when a user exits a configuration form (not my mainform). It will keep the settings in memory because when I open the form again, it will have my data that I configured still there, but it will not save it to disk. This is the filepath it is saving the xml file to C:\Users\david_000\AppData\Local[company name][project name]\1.0.0.0. I am using [UserScopedSetting()] in my class that implements the ApplicationSettingsBase file, so it should

Saving user scoped settings (ApplicationSettingsBase)

假如想象 提交于 2020-01-15 20:19:28
问题 I am trying to get my application settings to save when a user exits a configuration form (not my mainform). It will keep the settings in memory because when I open the form again, it will have my data that I configured still there, but it will not save it to disk. This is the filepath it is saving the xml file to C:\Users\david_000\AppData\Local[company name][project name]\1.0.0.0. I am using [UserScopedSetting()] in my class that implements the ApplicationSettingsBase file, so it should

Saving user scoped settings (ApplicationSettingsBase)

旧街凉风 提交于 2020-01-15 20:18:43
问题 I am trying to get my application settings to save when a user exits a configuration form (not my mainform). It will keep the settings in memory because when I open the form again, it will have my data that I configured still there, but it will not save it to disk. This is the filepath it is saving the xml file to C:\Users\david_000\AppData\Local[company name][project name]\1.0.0.0. I am using [UserScopedSetting()] in my class that implements the ApplicationSettingsBase file, so it should

add custom type in settings.settings

感情迁移 提交于 2020-01-03 07:24:20
问题 I would like to use configuration file .settings to save this struct: struct sR22Protocole { Int32 inputkey; Int32 outputkey; Int32 voltage; Int32 Ohm; Int32 Correction; }; In the settings designer, I can add different type but it doesn't show my struct in the browse section. Is there any way that the designer has access to my struct? If no, Is there any way to add it programmaticaly? 回答1: I believe the class (or struct?) must be able to be serialized to use in the settings file. I followed

Modifying application settings in unit tests

自作多情 提交于 2020-01-02 00:39:14
问题 I have a class library I want to unit test using Microsofts unit test framework. Some of the classes I want to test are configured using application settings. These settings are defined inside the Settings.settings file having application scope and suitable default values. When the library is used by the application these settings can be overriden in the App.Config file. If not the default values are used. That's exactly how I want it to be. In some of my test cases I want to test special

How do I store an array of a particular type into my settings file?

孤街浪徒 提交于 2020-01-01 17:10:21
问题 For some reason, I can't seem to store an array of my class into the settings. Here's the code: var newLink = new Link(); Properties.Settings.Default.Links = new ArrayList(); Properties.Settings.Default.Links.Add(newLink); Properties.Settings.Default.Save(); In my Settings.Designer.cs I specified the field to be an array list: [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Collections.ArrayList

How to change in runtime application settings

安稳与你 提交于 2019-12-30 23:35:26
问题 I'm trying to change in runtime one key of my applications settings file, but it does not work. I do on that way: ConfigurationSettings.AppSettings["XPTO"] = "HELLO"; It seems that it only changes in memory, not on the file. Does anyone knows how to do this? Thanks. 回答1: Take a look at my overview of .NET settings files...In short, I think you want a user-scoped setting. It will behave more like you expect. Edit: If you are using the settings designer in Visual Studio, then simply change the