settings

How to store a HashTable in the usersettings?

北慕城南 提交于 2020-01-13 02:44:07
问题 In .NET you can select a hashtable as type for a usersetting. However when I save it and retrieve it in this way, it doesnt seem to have saved it at all. Hashtable t = new Hashtable(); t.Add(1,"Foo"); t.Add(2,"Bar"); Properties.Settings.Default.Setting = t; Properties.Settings.Default.Save(); if(Properties.Settings.Default.Setting != null) foreach (DictionaryEntry entry in Properties.Settings.Default.Setting) { MessageBox.Show(entry.Key + " " + entry.Value); } Why doesnt it serialize it in

How to internet explorer properties window in C#

▼魔方 西西 提交于 2020-01-12 08:26:57
问题 I am working on a windows application, where i have to provide the user, a way to change the proxy settings by opening the IE settings window. Google chrome uses the same method, when you try to change the proxy settings in chrome, it will open internet explorer properties window with the connection tab selected. I have observed that chrome is running run32dll.exe to achieve this, but it is also passing some arguments along with it System.Diagnostics.Process.Start("rundll32.exe",

C# .NET Application Settings and Upgrading

半世苍凉 提交于 2020-01-12 06:59:09
问题 I use Settings.Default.MySettingName & Settings.Default.Save to save and load settings. When I change my version number how am I able to get the settings from the old version and apply to them my new version? I just can't quite figure it out. 回答1: Settings.Upgrade() looks like it has some promise - check out this post - and note that this method should be called once-and-only-once by your application. 来源: https://stackoverflow.com/questions/3429558/c-sharp-net-application-settings-and

Automatically display results of last cell execution in Spyder 4 console

孤街醉人 提交于 2020-01-11 13:20:14
问题 I updgraded from Spyder 3 to Spyder 4 and now when I execute a cell I need to wrap a print() around whatever variable is in the last line of the cell so that the contents are automatically printed / displayed in the console. What setting do I need to revert in order to get back to the prior set up. in case this is not clear: display = "1 2 3 4 5" display {Ctrl Enter} would ouput: 1 2 3 4 5 to the console now it does not display anything in the console Thank you. 回答1: What setting do I need to

How do I attach source code into a project's library in Eclipse?

删除回忆录丶 提交于 2020-01-11 10:37:08
问题 I created a simple standalone Spring application in Eclipse as a Java application (and not using maven or gradle). I manually downloaded the needed Spring framework jars, and the application works fine. Now, I wanted to debug the code and see the flow of code inside the Spring source as well. Hence I downloaded the source code of Spring , as a Zip file. I extracted the source code in a specific location in the file system. Now, how do I add the Spring source code into the project? Some of the

creating vbscript to change defualt wallpaper on win7home machines

随声附和 提交于 2020-01-11 03:58:45
问题 Need help making this script true. i beleave the first part is done file, but registry needs to be reflected from information 4-8 thank you. 1 'this vbscript should be named DefualtWallpaper.vbs 2 'copy this file to a folder. 3 'cat.jpg image should be in same folder as vbscript. dim filesys set filesys=CreateObject("Scripting.FileSystemObject") If filesys.FileExists("%cd%\cat.jpg%") Then filesys.CopyFile "%cd%\cat.jpg%","%windir%\web\wallpaper\windows" 4.'change registry to new file Set

keep settings in database

久未见 提交于 2020-01-10 14:18:10
问题 In a reusable application (in which i don't want to change any code) i would like to change a SETTING var that the application uses (in its forms and maybe other parts) to be dynamic (update its contents from a db table). What would be the best approach to do that (a middleware maybe?) ? 回答1: Look into the django-dbsettings project. 回答2: Django-settings is another alternative. It was created about a year after this question was originally asked. 回答3: Here is a grid of multiple such projects.

How to set up Maven to override a settings file for another when running a test?

对着背影说爱祢 提交于 2020-01-10 05:07:25
问题 See the following Maven generated project target classes test-classes src main java scripts resources datasource-settings.xml test java resources datasource-settings.xml I would like, when running a test , to use the settings found in test/resources/datasource-settings.xml instead of main/resources/datasource-settings.xml. Is it possible ? If so, what should i do to get my goal ? 回答1: Resources placed in ${basedir}/src/test/resources (the default location) will be automatically added to the

Save and Restore Form Position and Size

痞子三分冷 提交于 2020-01-09 13:56:30
问题 In a WinForms 2.0 C# application, what is the typical method used for saving and restoring form position and size in an application? Related, is it possible to add new User scoped application settings AT RUNTIME? I totally see how to add settings at design time, that's not a problem. But what if I want to create one at runtime? More details: My application is a conversion of an existing Visual FoxPro application. I've been trying to read as much as I can about application settings, user

How to add preference of Custom Input method to Android Settings app?

笑着哭i 提交于 2020-01-09 11:24:10
问题 Recently I've started to develop Android Soft Keyboard and got some problem with preferences. How to add a preferences to Android setting app? I've searched almost all the source code of AnySoftKeyboard, but haven't found anything what would add them to Settings app. I'm placing a link to show what I meant: http://code.google.com/p/softkeyboard/wiki/Settings (first picture from begin) Thank you P.S. Sorry for my bad english.. 回答1: I've found it myself: in XML of input method you need to put