-
Notifications
You must be signed in to change notification settings - Fork 52
TSettings
Charles Milette edited this page Jun 10, 2015
·
1 revision
TSettings is the name of a bunch of components, which are developed for an easy way to read and write settings out of your application.
This project is currently under development. And this is your chance to get involved with it. Checkout the current release out of the SVN and provide suggestions or patch-files with your ideas.
The idea behind the components is the following:
- Create a base component, which holds the settins in a tree structure (TCustomSettings)
- Provide easy functions (like those one known from TIniFile) to acces the settings (TCustomSettings.GetValue/SetValue)
- Extend the base component in order to read/write the settings from/to a medium (TSettingsFile, TSettingsStream)
- Create components which links components to the settings, for automated reading, writing the values of selected properties from/to the settings (TSettingsLinkComponent)
- Provide a way to cascade settings in order to add missing settings or to override settings by administrative settings
- Drop a TSettingsXMLFile on your Form
- Set the FileName property
- If the file exists, load it (SettingsXMLFile1.Load)
- Write your settings (SettingsXMLFile.SetValue('/Path/To/Setting', Value))
- Save the Settings(SettingsXMLFile.Save)
If yout want to store the form location, try this way:
- Drop a TSettingsXMLFile on your form
- Drop a TSettingsLinkForm on the form you want to store
- Connect the SettingsLink with the Settings
- Use TSettings.SaveProperties for defining, which properties of the form you want to save
- Rest like the first example