application-settings

app.config globalization

China☆狼群 提交于 2019-12-18 07:32:22
问题 web.config allow a globalization tag: This setting will set the globalization for the entire ASP.NET application. Does this tag work in app.config in standard forms applications too? If yes... where shall it be placed? Or.. is there another way to set the globalization for the entire forms application. Including dll's and all threads? 回答1: take a look at the following topic: How to: Set the Culture and UI Culture for Windows Forms Globalization To set the Culture to the Main Application use

Blackberry - application settings save/load

萝らか妹 提交于 2019-12-17 19:12:10
问题 I know two ways to save/load application settings: use PersistentStore use filesystem (store, since SDCard is optional) I'd like to know what are you're practicies of working with application settings? Using PersistentStore to save/load application settings The persistent store provides a means for objects to persist across device resets. A persistent object consists of a key-value pair. When a persistent object is committed to the persistent store, that object's value is stored in flash

Blackberry - application settings save/load

前提是你 提交于 2019-12-17 19:09:26
问题 I know two ways to save/load application settings: use PersistentStore use filesystem (store, since SDCard is optional) I'd like to know what are you're practicies of working with application settings? Using PersistentStore to save/load application settings The persistent store provides a means for objects to persist across device resets. A persistent object consists of a key-value pair. When a persistent object is committed to the persistent store, that object's value is stored in flash

Error: 'Cannot create unknown type '{clr-namespace:NameSpace.Properties}Settings'.'

旧巷老猫 提交于 2019-12-17 18:25:58
问题 I define my settings and styles in a ResourceDictionary: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:properties="clr-namespace:Kavand.UI.Properties"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary> <properties:Settings x:Key="settings" /> </ResourceDictionary> </ResourceDictionary.MergedDictionaries> <Style x:Key="PopupMenu_StackPanel"> <Setter Property="TextBlock.FontSize"

How to retrieve values from settings.bundle in objective c?

北慕城南 提交于 2019-12-17 17:57:26
问题 I have created a project that set and retrieve values from settings.bundle . I have also set some defaults values in settings.bundle file. Now the problem is when I retrieve values as NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; loginName.text = [defaults objectForKey:@"login_name"]; for the first time it shows null, but the values get set in iPhone application settings. If I change the values or set it manually, then values are retrieved properly. Help me out 回答1:

Ways of keeping configuration code out of logic code using Dependency Injection

核能气质少年 提交于 2019-12-17 17:39:25
问题 How can keep all the configuration file code out of my logic code using Settings (ApplicationSettingsBase) and Dependency Injection? With configuration I mean a customer specific configuration file. Do I really have to inject a configuration class everytime I need it or is there another pattern? It would be great to get some sample code! Samples: Static Configuration: public static class StaticConfiguration { public static bool ShouldApplySpecialLogic { get; set; } public static string

App.config: User vs Application Scope

流过昼夜 提交于 2019-12-17 17:26:33
问题 I have added App.config file in my project. I have created two settings from Project > Properties > Settings panel - I have noticed that when I am adding a setting, I can define scope as User or Application . - User Application If I define setting as User it goes to userSettings section, if I define setting as Application it goes to applicationSettings section App.config <configuration> <userSettings> <DemoApp.Properties.Settings> <setting name="MySetting1" serializeAs="String"> <value>Value1

How to store a list of objects in application settings

早过忘川 提交于 2019-12-17 10:37:28
问题 I have recently became familiar with C# application settings, and it seems cool. I was searching for a way to store a list of custom objects, but I couldn't find a way! Actually I saw a post to store int[], but it wasn't helpful for this problem. I tried to change the config of that solution in order to make it suitable for my problem. the XML config file of that was: <Setting Name="SomeTestSetting" Type="System.Int32[]" Scope="User"> <Value Profile="(Default)" /> </Setting> I tried to

How do I alter a .NET application/user settings on installation?

房东的猫 提交于 2019-12-13 07:30:32
问题 In a Windows Service project, with a Project Installer I tried the following: [RunInstaller(true)] public partial class ProjectInstaller : Installer { public ProjectInstaller() { InitializeComponent(); } protected override void OnBeforeInstall(System.Collections.IDictionary savedState) { base.OnBeforeInstall(savedState); Settings.Default.ASetting = "aValue"; Settings.Default.Save(); } protected override void OnAfterInstall(System.Collections.IDictionary savedState) { base.OnAfterInstall

How to store relatively static but configurable information

馋奶兔 提交于 2019-12-13 05:16:39
问题 I have a table (dictionary of dictionaries) to store mapping of integers to strings. I have types and sub-types. e.g. type 1=>fruits and sub-type 1=>apple. The mapping shall be configurable in my setting interface, but for the reset of the application, it's rather static. So I don't want to read from property-list every time I check the mapping. I'd like to only read once when program starts and only write when user changes setting. Where should I keep this table at runtime? I have two