application-settings

How to make application settings independent of .exe path?

佐手、 提交于 2019-12-07 08:08:34
问题 Suppose I want to move my app from c:\myapp.exe to d:\myapp.exe. It will loose all settings. How to prevent that? 回答1: Personally I use the registry to save and load my settings, so the location of my application isn't affected, but if you're using User.Config etc and want to fix the location, this might help: Can I control the location of .NET user settings to avoid losing settings on application upgrade? 回答2: It is an implementation detail of the LocalFileSettingsProvider class. Which has

Why is isolated storage not persisting in my WP7 application?

陌路散爱 提交于 2019-12-07 05:34:25
I am using IsolatedStorageSettings.ApplicationSettings for my application. All code associated with Isolated storage occurs in my Application_Launching, Application_Activated, Application_Closing, and Application_Deactivated methods as follows: public IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; private void Application_Launching(object sender, LaunchingEventArgs e) { if (settings.Contains("myObjList")) { App.ObjList = (ObservableCollection<myObj>)settings["myObjList"]; } else { settings.Add("myObjList", App.ObjList); } } private void Application_Activated

Is storing variables in $rootScope good practice?

无人久伴 提交于 2019-12-07 04:05:38
问题 Update 2: I found a solution I've altered the settings file to just a JS file, added var tempSettings = to the beginning of the file, and added it in index.html. This way it gets loaded with the initial HTML, ensuring it will exist when app.run goes. The settings service then takes this tempSettings variable and puts it in the service. To clean up, I remove the tempSettings pointer. New settings file called settings.js var tempSettings = { "environment": "development", [...] Added to index

Changing .NET application settings without recompiling

自古美人都是妖i 提交于 2019-12-07 02:15:02
问题 I have a windows service that is referencing another assembly (class library). In this other assembly I used Application Settings to store some values. When I copy all the required files to the server I can see these settings in AssemblyName.dll.config file. However, when I change a setting in this config file and restart the service the change has no effect. Even if I uninstall/reinstall the service it still returns the old value at runtime. Config file: <setting name="RecordLimit"

Passing UISegmentedControl values from FlipSideViewController in an Utility application to the mainviewcontroller…

只谈情不闲聊 提交于 2019-12-06 15:09:45
问题 For example, I want the maptype in the Mainviewcontroller to change from satellite to hybrid if the segmentedcontrol in the flipsideviewcontroller changes? What am i doing wrong? Basically, I want the mainviewcontroller to react to the changes made in the flipsideviewcontroller!!! FlipsideViewController.h #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> #import <MapKit/MKMapView.h> @protocol FlipsideViewControllerDelegate; @interface FlipsideViewController : UIViewController { id

Saving setting to a exe

笑着哭i 提交于 2019-12-06 14:17:24
I have a program which I want to store information in a string. I have been using the Properties.Setting.Default.STRINGname to store the information, which works fine on my PC, and I can see the saved strings (when I go to the settings in the application). But when I take the application to a new PC it losses the strings. Is there a way to be able to edit this information and save it in the app? So basically I need to be able to convert the user setting to application setting, but after the runtime. var settings = Properties.Settings.Default; settings.H1 = textbox1.text; settings.H2 = textbox2

Access section 'applicationSettings' (not 'appSettings') in config file from setup

孤人 提交于 2019-12-06 14:13:50
I am in the process of creating a setup for a web application we build. No I have a configuration file, which looks something like like this, which contains a section 'appSettings', and a section 'applicationSettings': <configuration> <appSettings> <add key="Password" value="dummy"/> <add key="Username" value="dummy"/> <add key="DB" value="dummy"/> <add key="DBServer" value="dummy"/> <add key="LogStoredProcedure" value="dummy"/> <add key="ErrorStoredProcedure" value="dummy"/> <add key="ErrorFileName" value="dummy"/> <add key="EncryptionKey" value="dummy"/> </appSettings> <applicationSettings>

Storing XML data for use with an addin

你离开我真会死。 提交于 2019-12-06 09:55:13
问题 I am in the process of creating an outlook addin. The addin works sort of like an aggregator. In this addin, the user will need to specify multiple sets of account information for the addin to have access to...see below: <Accounts> <Account> <id>blah1</id> <password>blah1 again</password> <Account> <Account> <id>blah2</id> <password>blah2 again</password> <Account> <Account> <id>blah3</id> <password>blah3 again</password> <Account> </Accounts> So far I have thought that this should be

Application settings appear after clean when program copied elsewhere

孤街浪徒 提交于 2019-12-06 06:25:26
I have a WinForm project with one form and an application settings file. When the form loads, it reads from application settings and if the program successfully runs (i.e. the file is written to the destination) the application settings are saved for the next runs. I am noticing a strange behavior as I build my solution: When I clean and rebuild my solution and test my program in the bin/Release folder, everything looks fine and the application settings are clear. But when I copy the same files to another destination and run the program from there (even though the .exe.config file is also

Android: Anyway to know if 'Unknown Sources' is checked?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 05:50:18
Is there any way to find out if the user has checked the 'Unknown Sources' checkbox in the 'Application settings' menu? You can use the INSTALL_NON_MARKET_APPS setting. Something like that : boolean canInstallFromOtherSources = Settings.Secure.getInt(Settings.Secure.INSTALL_NON_MARKET_APPS) == 1; 来源: https://stackoverflow.com/questions/4594503/android-anyway-to-know-if-unknown-sources-is-checked