简体   繁体   中英

C# Winform save settings

I am working on a project in C# Winforms and one of the requirements is to allow the user to save various settings versions and give a name for each of them. The idea is to have a form, the user press the button Save Setting, enter a string in the text box for the name for that setting. Later the user can select from a comboBox which settings to use. I already created a standard setting which saves automatically when the user closes the form. Can you please direct me on how to that?

EDIT: The following forms demonstrate what I would like to achieve. The user enter some data in the textBoxes (form Main), then save the details giving to this setting the name of setting01 (form Save setting). Then enter some other details and give the name of setting02.
在此处输入图片说明在此处输入图片说明在此处输入图片说明

Now the user can use setting01 or setting02, which contain different values for the same textBox. 在此处输入图片说明

Can please someone help me with this adventure?

Microsoft Developer Network has a nice tutorial on how to create a database and using it to store and retrieve data here

Hope it helps.

EDIT:

When the data is collected, do:

combobox1.items.add(data_that_was_collected);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM