What is the best way to store and load application level properties in Java.
Is there anything simulare to .net where I would just put something in the app.config
<appSettings>
<add key="emailAddress" value="[email protected]" />
</appSettings>
And then retrieve it like this:
string AdminEmail = ConfigurationManager.AppSettings[...
I wrote this to quickly test
Why arent my settings being saved? The first time i run this i have 3(old)/3(current) elements. The second time i get 3(old)/5(current), third time 5(old)/5(current).
When i close the app the settings completely disappear. Its 3 again when i run it. I made no changes to the app. Why arent my settings being...
I've been looking at this article but am having issues saving the enumerated value in the settings.
I have created the following enum
public enum FType
{
None,
Delimited,
FixedWidth,
XML
};
I have the radio button selection working nicely but I now want to store the selected option in the settings but there doesn't ap...
I know it's possible to reset the My.Settings with Reset() method.
Is there anyway to do the same thing for just one setting? Or simple getting its default value instead of the one changed by user. (I'm referring to User Scope Settings)
...
.NET allows you to use .settings files to manage application settings. I would like to store Production, Development and Test settings separately in a way that I can do something like this:
EnvironmentSettings environmentSettings;
// get the current environment (Production, Development or Test)
ApplicationEnvironment Environment = (Ap...
I'm a little confused by the different ways visual studio allows dynamic values to be saved to a project, and how they are intended to be used. I understand that if I need to include binary information like an image or a sound file with my application I need to add that to a resource file. But if I'm saving something like a file path as ...
We have a couple of long running back-end processes that take longer than the default 30 seconds.
Our NHibernate version is 2.0.1.4000 and Spring.NET is 1.2.0.20313.
NHibernate is configured through Spring.NET this way:
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
<p...
OK I am trying to make it so that when a user launches my air app, it positions itself and sizes itself to whatever it was the last time it was opened.
Here is my code:
private function init():void
{
gotoLastPosition();
this.nativeWindow.addEventListener( Event.CLOSING, saveAppPosition );
}
private function saveAppPosition(e:E...
ASP.NET 3.5
Classes throughout our solution referenced ConfigurationManater.AppSettings[""] to get appSettings (from web.config).
We decided we weren't happy with that. Folks were mistyping appSetting key names in code (which compiled fine), and it was cumbersome to track usages. And then there's the duplicated strings throughout the...
The title says it all really!
I'd like to reference my own variables in my info.plist & build settings files.
Is this possible? Any ideas?
Cheers!
Nick.
...
I am using VS2010 C#.NET 3.5 and application settings (the Settings.settings file). What I want to do is have different settings for my development and production environments without having to litter my code with conditional statements checking for debug mode. What is the common approach to this problem?
...
With the environment variable %allusersprofile% I can get the directory where common settings are stored. But most programs store their settings in the sub-folder "anwendungsdaten" (German, application data). Is there a way to get the direct path to this folder? The problem is that its name is language dependent.
Thanks.
...
When I change and synchronize value in my app, they get saved, but the changes do not appear in the settings app. Is there a way to get them synced while maintaining the ability to make changes inside the app? Here is my code:
//I'm registering the defaults from the Settings bundle I created using David Keegan's class inside my applicat...
I am programming in .NET
I have an application setting of type string.
On my form I have a textbox. I bound the text property of the textbox to my application setting. If I type something in the textbox it changes the value that is held in the Application setting but the next time I start the program it goes back to the default value. Do...
Is there a way to access the settings file from a different project? For example, I have a solution that contains 2 projects (Lets call them Proj1 and Proj2). I want to access the application settings of Proj2 from Program.cs in Proj1. Is this possible?
...
Hello guys!
To store application settings, I am using the Settings tab in the project properties. In the code, I write Settings.Default.FontSize = size; and then Settings.Default.Save();
When I close the application and run it again the new value of the setting should be there. And yes, it is working properly on Windows, with Mono 2.4 o...
I'm used to use web deployment projects. Currently I am developing a new web application with VS2010 and want to try to get along with the new web.config principle and deployment issues.
How can I replace a simple setting like
<applicationSettings>
<NAMESPACE>
<setting name="Testenvironment" serializeAs="String">
<value>True</...
hi folks,
Just wandering if its a good idea to put username and password in the application settings?
If not where is the best place to store these?
--Jonesy
...
Some time back in the nineties, Microsoft introduced the Windows Registry. Applications could store settings in different hives. There were hives for application-wide and user-specific scopes, and these were placed in appropriate locations, so that roaming profiles worked correctly.
In .NET 2.0 and up, we have this thing called Applicat...
my ASP.NET application reads an xml file to determine which environment it's currently in (e.g. local, development, production).
It checks this file every single time it opens a connection to the database, in order to know which connection string to grab from the Application Settings.
I'm entering a phase of development where effic...