applicationsettings

ApplicationSettings across libraries

I'm trying to abstract out all database code into a separate library and then use that library in all my code. All database connections are done using typed TableAdapters that I create by dragging and dropping in datasets in VS2005, using a connection string from the appSettings. The problem that I haven't been able to solve is that .Ne...

How do I retrieve ApplicationSettings from a loaded app.config file

Is it possible to access the values from the applicationSettings section of a loaded app.config file? I have found an example How do I retrieve appSettings, but i can't find out how to access applicationSettings this way. ...

.NET Unit Testing - How to Test applicationSettings

I have a class library that is using application settings to determine the behavior of a particular method. I realize that the argument could be made that this is a Bad Thing, but we know that the behavior of the site is going to change about a week after launch (no real definitive time), and it will be easiest to just change the sett...

C# - User Settings broken

We had a rare exception occur when reading the standard .Net user settings (this are the ones found in "project properties" in VS 2008): System.Configuration.ConfigurationErrorsException was caught Message="Configuration system failed to initialize" Source="System.Configuration" BareMessage="Configuration system failed to initiali...

appSettings file attribute equivalent for applicationSettings

In a asp.net web.config file you can do <appSettings file="local.appSettings.config"> <add key="foo" value="bar" /> </appSettings> and it will look in local.appSettings.config for any overrides to the foo/bar setting. Is there an equivalent for applicationSettings? Something like this <applicationSettings file="local.application...

how to make NSUserDefaults show in Setting on iPhone?

according to this image, i try to save data in NSUserDefaults but my App not have application setting in menu Setting on iPhone? how can i make this? thanks. ...

Why does a simple ApplicationSetting PropertyBinding for a Form does not work in C#?

My question involves this simple walkthrough shown in the article Preserve Size and Location of Windows Forms – Part I by Dennis Wallentin. This approach works 100% fine when using VB.NET. When using the same steps in C#, however, the settings within the Settings tab of the application's properties looks correct, and the app.config fil...

Validating Application Settings Key Values in Isolated Storage for Windows Phone Applications

Hello everyone. I am very new at all this c# Windows Phone programming, so this is most probably a dumb question, but I need to know anywho... IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; if (!appSettings.Contains("isFirstRun")) { firstrunChe...

how to change .NET user settings location

By default settings are stored at: C:\Documents and Settings\\Local Settings\Application Data\<Project Name> How can I change this path to application directory. I also don't want to have different files for different users. How make the settings global? I tried to change the scope of the settings to "application" but then I cannot c...

Application settings do not allways save

I have a bit of a Heisenbug. I have a list of what was recently searched for sometimes it will save the history some times it does not. When I attach the debugger and step through StartFind() it works every time. public Form1() { oldClinicsBindingSource.DataSource = ContractFlowTool.Properties.Settings.Default.RecentClinics; } priva...

VisualStudio 2010 Settings Page - Collection Settings

I have a list of Filemaker database names Each DB name has a list of field/attribute pairs associated with it I have a windows form application in C# 4.0 (vs2010) that wants to use the above data I would like to maintain the list either in the Visual Studio settings page, or in one of the standard visual studio settings files using the...

how to store settings for deployable c# application?

I want to store settings for my C# application, such that default setttings can be easily shipped with my binaries and the end-user can change them using a simple text editor(or in some other simple way). I seem to face several alternatives : a .config file, .settings file or a .resx file. What are the pros and cons of these? Edit1: En...

FileNotFoundException in ApplicationSettingsBase

When debugging an application I always get the following error when break on exception is enabled in Visual Studio. This is really bugging me, since we work with break on exception. The funny thing is, that it still works when I continue (the StringCollection is loaded). The Message is: Could not load file or assembly 'System.XmlSerial...

How do I store a custom class from within the same assembly in application settings?

I have a very simple class public class Preferences { public bool RepeatInfinite { get; set; } public int RepeatCount { get; set; } } If I put this class in another assembly it shows up in the Settings tab when you browse for the type. If I however put this class in the same assembly as the running program, I can't see it or ...

[iphone] initial settings of NSUserDefaults

So I was reading this: http://stackoverflow.com/questions/2228302/storing-iphone-application-settings-in-app which seems simple enough. However, where/how would I define the initial settings? So for instance I have a Country setting: UK or USA. When the app is first installed/opened I want it to automatically know/set NSUserDefaults to...

Application Settings + DirectoryInfo/FileInfo

I'm still new to C#... I'm building a WPF application and I'm trying to apply some User Application Settings. It's easy to insert standard App Settings (int, double, string, etc). I've even got something like WindowState inserted. I'd like to have a DirectoryInfo and/or FileInfo as savable settings instead of Strings. Selected type:...

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? ...

ASP.NET applicationSettings (Giving Me) Fits

I've read all of the examples and I've yet to figure out how to get information out of the web.config file using applicationSettings (as opposed to appSettings). I have the following for my configSections: <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4...

WPF StringCollection + TextBox

ApplicationSetting: RenameSettings - System.Collections.Specialized.StringCollection - User - *wall of text" <Application x:Class="app.App" ... xmlns:properties="clr-namespace:app.Properties" StartupUri="MainWindow.xaml"> <Application.Resources> <properties:Settings x:Key="Settings" /> </Appli...

Visual Studio, Application Settings... rearrange

Silly questions... purely aesthetic... given the picture above. How do you move the values up/down? For example, State belongs grouped with Height/Width/Top/Left (Window Position + state). Not the only project where I later add stuff and it slowly gets out of order. Can delete/re-add, but that gets tedious and error prone. Can just le...