application-settings

Settings.Default.<property> always returns default value instead of value in persistant storage (XML file)

£可爱£侵袭症+ 提交于 2019-12-30 03:12:28
问题 I recently wrote a DLL in C# (.Net 2.0) which contains a class that requires an IP address. A co-worker of mine altered the class to retrieve the IP from a ".dll.config" (XML) file -- This apparently is automatically generated by the "Application Settings" file he created (Settings1.settings). The benefit of this was to allow the end-user to change the IP address in the XML/config file at will. Unfortunately, when I check his code out of the tree and try to compile (or use) this new code, any

How to create System Apps in android

假装没事ソ 提交于 2019-12-30 00:53:13
问题 I want to create an system application(while installing it will ask user permission to make it as system app) for UN-rooted application. As I am not familiar in android, please tell me how to create it. Thanks in advance. 回答1: True system apps are baked into the ROM image, and signed with the same key the ROM was signed with, giving them extra access to the system. You cannot add a new system app on the same level without updating the ROM image of the device, and even then you'll need the OEM

How do I retrieve ApplicationSettings from a loaded App.config file?

主宰稳场 提交于 2019-12-29 04:05:46
问题 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. 回答1: The applicationSettings are readonly during runtime. You can set/modify them either via a text editor in the app.config file directly, but it is recommended to open the project properties in Visual Studio and select the "Settings" tab. It is important to set the right

how to create a custom settings view / make cell label editable

这一生的挚爱 提交于 2019-12-25 09:27:25
问题 I need to create a custom settings view used within the app. The app is a mockup so it actually does have one already, it uses a UITableViewCellStyleValue1, but nothing is editable. So essentially what I would like to have is the same thing but with editable detailTextLabel (the label on the right hand side), what's the best way to do this? 回答1: You can continue to use UITableViewCellStyleValue1. You'll need to create UITextField instances for each cell you want editable. Then you assign each

How to access MyProject.MySettings.Default.SomeSetting from xaml?

被刻印的时光 ゝ 提交于 2019-12-24 10:35:17
问题 I have defined a StringCollection in the Project Settings. I want to use the values in a ComboBox. Is there a way to access it xamly? I tried: <CollectionViewSource Source="{x:Static src:MySettings.Default.MyCollection}" /> <CollectionViewSource Source="{Binding Source={x:Static src:MySettings.Default.MyCollection}}" /> ****src** is the xmlns of the project* It says: "Type src:MySettings.Default was not found". The thing is that MySettings is a class that offers a Default property which is a

Setting WPF Window Background to Resource Dictionary Brush User Setting

那年仲夏 提交于 2019-12-24 00:47:21
问题 I have two brushes declared in my ResourceDictionary and I would like the user to select which background they want to see on the main window. Resource Dictionary Brushes: x:Key="LightBlueMainWindow" x:Key="DarkBlueMainWindow" Window: Background="{DynamicResource LightBlueMainWindow}"> I have a project User Setting defined 'MainBackground' which is a string and can contain either key (LightBlueMainWindow or DarkBlueMainWindow). What is the best way to dynamically set the background based on

Programmatically set Azure App Service application settings / environment variables

血红的双手。 提交于 2019-12-24 00:45:43
问题 I have an ASP.NET Core (RC1) app running on Azure App Service. The app takes its configuration from environment variables. I currently use the Azure Portal's 'Application Settings' page to set these environment variables. The app is deployed with Kudu (if this is relevant?) I would like a way to programmatically set these environment variables so that I don't have to go through the Azure Portal every time I want to create a new environment variable or modify an existing environment variable.

Storing a radio button selection in the settings

。_饼干妹妹 提交于 2019-12-24 00:24:39
问题 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 appear to be the ability to store an enumerated variable. I assumed I could convert the enum to a string and then convert back but being a bit of a noob when it comes to WPF I'm

Storing database settings outside app.config

主宰稳场 提交于 2019-12-23 05:13:49
问题 I've been writing a c# exe that will be running on a live web server, but I want to be able to test it on our staging server. Since the staging server has different database settings (in the app.config) from my localhost, is there any way I can store the connection string outside the app.config so that I can easily get to it? Also, is it possible to store the database connection string, then access it via the app.config? This might sound odd, but I'm using a dll from a CMS that uses the value

Why is isolated storage not persisting in my WP7 application?

戏子无情 提交于 2019-12-23 03:22:17
问题 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[