application-settings

How to check internet access is enabled in android?

余生长醉 提交于 2019-12-06 04:12:49
Iam trying to create an application that connect to a webserver and retricve data, i want to do some functions when i click my application, first it check whether the internet access is enabled? if it is enabled it start the application , else open the internet access settings..after that it redirect to my application.... when the application is connecting to web-server, connection is timed out after a specific time if the connection is not success. In an application of mine, I have a class defined like this: public class ConnectionDetector { private Context _context; public ConnectionDetector

StringCollection in application settings doesn't get stored

痴心易碎 提交于 2019-12-06 03:55:14
I would like to use a StringCollection as application settings, however while reading it's not a problem, I found out that settings are not stored. How to make it works? Any workaround? What's the problem here? Code I'm using: private static void AddToRecentProfiles(string path) { if (SpellCaster3.Properties.Settings.Default.RecentProfiles == null) SpellCaster3.Properties.Settings.Default.RecentProfiles = new StringCollection(); int index = SpellCaster3.Properties.Settings.Default.RecentProfiles.IndexOf(path); if (index >= 0) SpellCaster3.Properties.Settings.Default.RecentProfiles.Swap(index,

Is it possible to set config settings on Firefox from a Addon

浪子不回头ぞ 提交于 2019-12-06 02:49:55
问题 I'm looking for a way to print from web without prompting the print dialog (I just made the question). I found This method for Firefox and it seems to work, but it obviously will affect all websites. So I'm thinking of developing a Firefox Addon that makes this configuration to affect only specific websites. I don't know nothing about building Firefox addons, but if it's possible to change settings this way I will learn how to do it. So my question is.. Is it possible to set config settings

How to get the Name of an application setting in C#?

烂漫一生 提交于 2019-12-05 18:27:17
In application setting of visual c#, we can create a series of settings with specific Name, Type, Scope and Value. I have access to the value by the code: string color= Myproject.Properties.Settings.Default.mycolor; How can I get "mycolor", which is the name of this setting, in the output? If you want the name of the setting, then you are looking to get the property name. In the book Metaprogramming in .NET , Kevin Hazzard has a routine that looks something like this: /// <summary> /// Gets a property name string from a lambda expression to avoid the need /// to hard-code the property name in

Windows application data directory

时间秒杀一切 提交于 2019-12-05 17:28:17
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. Not sure about what programming language you're using, so I'll assume the basic Windows api. In XP you can call SHGetFolderPath with CSIDL_COMMON_APPDATA as a parameter. It looks like Vista and 7 have a new set of functions that do the same thing, you'd probably want to call

Azure does not override application settings

徘徊边缘 提交于 2019-12-05 11:54:32
In my Azure App Service I want to update application settings, but after publish from VS the keys doesn't override values from local Web.config In Azure it looks like: In the result my web.config on azure contains values from local settings <connectionStrings> <add name="MainConnectionString" connectionString="ConnectionStringToReplaceByAzure" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings> <add key="MS_SigningKey" value="Overridden by portal settings" /> </appSettings> Azure never physically modifies your web.config file. Instead, the Azure App Setting is injected

Changing .NET application settings without recompiling

只谈情不闲聊 提交于 2019-12-05 07:45:47
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" serializeAs="String"> <value>300</value> </setting> Code: if (recordCount > Settings.Default.RecordLimit) /

Define a custom path where the user.config file should be saved?

情到浓时终转凉″ 提交于 2019-12-05 01:47:18
If I rename my compiled application for example from myapp.exe to app.exe then when I run the renamed executable a new user settings folder is generated in this path: C:\Users\{User}\AppData\Local\{CompanyName}\{ExecutableName}_Url_{SystemGUID or something strange} So I loose all the saved settings. Then how I could solve this problem defining in a VBNET WinForms my own location to store the user.config file, or any other solution using the applicationsettings infrastructure ? (not saving the settings on the registry or other things) PS: I've read this SO post which is a little bit different

Store String Array with Values in Application Settings [duplicate]

十年热恋 提交于 2019-12-04 16:23:58
问题 This question already has answers here : How to save a List<string> on Settings.Default? (3 answers) Closed 3 years ago . I've modified my Settings.settings file in order to have system_Filters be a System.String[] . I would like to populate this variable within the Visual Studio designer and not from within the code. I can get it to work within the code using the following: Properties.Settings.Default.system_Filters = new string[] { "a", "b", "c" }; string _systemFilters = Properties

Is it possible to set config settings on Firefox from a Addon

两盒软妹~` 提交于 2019-12-04 05:59:15
I'm looking for a way to print from web without prompting the print dialog ( I just made the question ). I found This method for Firefox and it seems to work, but it obviously will affect all websites. So I'm thinking of developing a Firefox Addon that makes this configuration to affect only specific websites. I don't know nothing about building Firefox addons, but if it's possible to change settings this way I will learn how to do it. So my question is.. Is it possible to set config settings on Firefox from a Addon and for specific websites? Thanks a lot. If you are going to develop a Firefox