application-settings

User settings are not saved (Settings.Default.Save();)

In the properties of project I created a setting like this NumberOfUsers int User 10 The columns are Name, Type, Scope and Value. Then there is a ComboBox where user can set a 'NumberOfUsers'. This combo has SelectedIndexChanged event where I save the changes whenever the user change the value of combo. Here's the code: Settings.De...

Can you store a generic dictionary in Properties.Settings in 4.0?

The new Dictionary<Tkey,TValue> in .net 4.0 is serializable, so... can I now somehow use this in the Settings.Settings or Settings.Designer.cs? ...

.NET ApplicationSettingsBase Should I call Upgrade() every time I load?

We have application settings derived from ApplicationSettingsBase. When we push a new version of our app we need to call // // Summary: // Updates application settings to reflect a more recent installation of the // application. public virtual void Upgrade(); (from the meta-data) now there are some tricky ways to de...

.Net application settings

I want to implement application settings to have them update settings that wont be set in a file i manage. I have the following so far: In settings I have a variable named valuesforcomparison of type nameValueCollection and the scope is user. Now when I do the following the variable isnt updated the next time the user runs the program....

Making an in-app settings page (iPhone)

Hi, I am making an app which needs a settings page. Which will be a different class, so how do I pass data from one class to the other? For example: There is a UISwitch on the settings page, and I need to see what option the user selected for another class. Thanks. ...

Dependency Injection and AppSettings

Let's say I am defining a browser implementation class for my application: class InternetExplorerBrowser : IBrowser { private readonly string executablePath = @"C:\Program Files\...\...\ie.exe"; ...code that uses executablePath } This might at first glance to look like a good idea, as the executablePath data is near the code ...

Is there a limit on a user setting size in .NET application?

I would like to serialize my object with many values as string(xml) into user settings. Is there a limit on how large a "string" user setting can be in a .NET application? I am extending ApplicationSettingsBase to save my settings. ...

Changing language/culture in a MySQL/Dblinq project

Hi everybody, I'm not very familiar in programming databases, but I have a Mysql-Database which I access with Dblinq under C#. Now when I enter dates, numbers etc, the english notation is used, but my customer needs german. How can I switch my database from english to german? (The Database is still empty, I can easily re-create it, if ...

iPhone Settings.bundle - how to disable/enable a setting based on other settings?

Hard to explain, but luckily there's an example. On an iPhone, when you go to Settings > Nike + iPod, in the app's settings, when you set Nike+iPod to off, it disables the rest of the settings. How do I do that? Use one setting to disable or toggle off another setting? ...

Selecting Multi-Value Element in settings bundle not returning to previous page

My settings bundle specifies a Multi-Value element of type PSMultiValueSpecifier exactly as described by Apple here. I have all the required Keys entered, as well as the Titles array matching the values array in size. The default value is an integer, and matches a value in the values array (so no problems there). My issue is a usabili...

How do I "Change the Value of a Setting Between Application Sessions" in a C# application?

The MSDN web page makes it sound easy to change application settings by hand. I can't find the file though. I can find the file in my development path, but I have no idea if that is the path the application is actually running in. I set a DB connection setting in "settings.settings" and now I want to change it on my machine. I unders...

Force regeneration of Settings.settings file after change in app.config

Hi I have an automated build process that sets up the application for a specified mode (e.g. Dev, uat, live). Depending on this mode I want to update Connection Strings to the relevant one. However, in my Data Access Layer there is an app.config file which stores the connection string and this is used to feed the Settings.Settings file...

User Settings: What are my choices?

hello, I'm trying to find out what my choices are when I'm going to use user (persistent) settings. In vs Studio this is possible in the properties of your project but I'm getting to know the limits there: Only values are allowed that can be converted to string. Collections (e.g items in a Listbox, with a name and value) cannot be sa...

Why wont my application read my MyApplication.dll.config file?

I'm trying to use application settings with a C#.NET project I am working on. But I can't seem to get it to return anything other then the default values. Through the project properties I've added a single setting, DBConnectionString, and set its value to a connection string I want to use. Its scope is set to "application". Doing this c...

ASP.Net MVC: Where to store Application and Admin Panel settings? Web.config?

Having built myself a decent website using ASP.NET MVC, I'm about to build an "Admin Panel" for users in the "Admin" Role to control the website with. Specifically, the website that I've built is an internal site for an enterprise and it consists of a bunch of mini web-apps, each of which need to be configured and/or tweaked from time to...

Find current country from iPhone device

Hello, I have to get the current country in the iPhone settings. Can anyone tell me how to get the current country in iPhone application. I have to use the current country for parsing the RSS feed in which I need to pass the current country. Please help me out to find the country . Thanks in advance. ...

ASP.NET: Where to store application settings?

Recently, I discovered that the "Web.Config" file contains an <appSettings> section which seemed good for storing one's Application Settings. Heck, it even has a programmatic way to access the file thru a standard System library. So being all clever, I wrote an Interface to access it and then a Concrete implementation of the interface, s...