The method I use for my program is to store the configuration values in a class that uses the DataTable in the DataSet to store the values. When I want to save it, I use DataSet.WriteXML () for any file name that the user wants.
( DataTable , ), DataTables . DataSet io.
DataSet.ReadXML().
, , . , , , - , , - .
(, ), - , .
.
, :
To create a new one:
Dim UIcfg As UIsettings = New UIsettings("TestSettings.cfg")
UIcfg.setGeneralValue("Version", "1.0.0")
UIcfg.setGeneralValue("Author", "Bobs YourUncle")
UIcfg.setFieldValues("FirstName", "Left", "1")
UIcfg.setFieldValues("LastName", "Right", "1")
UIcfg.setFieldValues("ShoeSize", "Left", "2")
UIcfg.setFieldValues("ShoeColor", "Left", "3")
UIcfg.Save()
To get values from it:
Dim value As String = ""
Dim values As String = ""
value = UIcfg.getGeneralValue("Author")
values = UIcfg.getFieldValues("FirstName")
, .: -)