application-settings

Application settings error after changing target framework of project

老子叫甜甜 提交于 2019-12-10 12:40:08
问题 In my application I am using user settings as explained here. Then I realized that in VS 2010 I was using .NET 4.0 while only .NET 2.0 was sufficient. When I changed the framework and build the project, in my code whenever I access setting now, I get the following error: An error occurred creating the configuration section handler for userSettings/Vegi_Manager.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or

AIR: save application location and size

泄露秘密 提交于 2019-12-09 14:07:24
问题 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:Event = null):void { var xml:XML = new XML('<position x="'+this.nativeWindow.x+'" y="'+this.nativeWindow.y+'" width="'+this.width+'" height="'+this.height+'"/>'); var f

Changing NHibernate Session.Save command timeout

十年热恋 提交于 2019-12-08 15:07:44
问题 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"> <property name="DbProvider" ref="DbProvider"/> <property name="MappingAssemblies"> <list> <value>SomeKindOfAnItem</value> </list> </property> <property name=

Autocomplete source from project settings

强颜欢笑 提交于 2019-12-08 03:22:12
问题 I want to make an autocomplete string collection and edit it on runtime (add more text to collection) for a search textbox. And list this collection in a listbox. But this collection should be stored in application settings and be restored when i restart the application. How can i do it ? I tried adding a System.Windows.Forms.AutoCompleteStringCollection type of setting. I used string newsuggestion = textBox1.Text; Settings.Default.derslistesi.Add(newsuggestion); "derslistesi" is the name of

How to check internet access is enabled in android?

时间秒杀一切 提交于 2019-12-08 02:01:42
问题 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. 回答1: In an application of mine, I have a

Application settings appear after clean when program copied elsewhere

折月煮酒 提交于 2019-12-07 23:20:53
问题 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

Saving setting to a exe

≡放荡痞女 提交于 2019-12-07 22:25:44
问题 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

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

≯℡__Kan透↙ 提交于 2019-12-07 21:16:52
问题 Is there any way to find out if the user has checked the 'Unknown Sources' checkbox in the 'Application settings' menu? 回答1: 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

Application Settings + DirectoryInfo/FileInfo

无人久伴 提交于 2019-12-07 18:21:53
问题 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: System.IO.File gives an error message "Abstract types are not supported". Which makes sense, since how can you implement an abstract type as a setting. Selected

Windows application data directory

牧云@^-^@ 提交于 2019-12-07 08:18:55
问题 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. 回答1: 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.