TParams Class
Use TParams with its class methods if you only want to manage one settings file. If you need more than 1 file to store your settings in the same project, crreate instances of TParamsFile instead of using TParams.
Olf.RTL.Params.TParams
The TParams type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | PortableMode | Portable mode : if true nothing is done on the storage. Default value is false. |
![]() ![]() | onAfterLoadEvent | Called after loading the settings file |
![]() ![]() | onAfterLoadProc | |
![]() ![]() | onAfterSaveEvent | Called after saving the settings file |
![]() ![]() | onAfterSaveProc | |
![]() ![]() | onBeforeLoadEvent | Called before loading the settings file |
![]() ![]() | onBeforeLoadProc | |
![]() ![]() | onBeforeSaveEvent | Called before saving the settings file |
![]() ![]() | onBeforeSaveProc | |
![]() ![]() | onCryptEvent | Called before saving the parameters in a file (and after onBeforeSave). If crypted, the file is saved as a binary format. If uncrypted, the file is saved as a JSON text file. |
![]() ![]() | onCryptProc | |
![]() ![]() | onDecryptEvent | Called after loading the parameters from a file (and before onAfterLoad). If crypted, the file is saved as a binary format. If uncrypted, the file is saved as a JSON text file. |
![]() ![]() | onDecryptProc |
Name | Description | |
---|---|---|
![]() ![]() | AsJSONObject | Return the current parameters as a JSON object |
![]() ![]() | BeginUpdate | Allow parameters changes but delay the Save operation to the EndUpdate call. |
![]() ![]() | Cancel | Cancel current changes and reload previous saved values |
![]() ![]() | Clear | Clear current parameters list |
![]() ![]() | Delete | Delete the file where settings are stored. |
![]() ![]() | EndUpdate | Closes the block of code started with BeginUpdate. If you did some changes, it saves them by default. |
![]() ![]() | HasChanged | |
![]() ![]() | InitDefaultFileNameV2 | Initialise the folder and the filename with a new default tree: => "Documents / Editor / Software" for DEBUG and iOS => "AppData (HomePath) / Editor / Software" in RELEASE (except iOS) |
![]() ![]() | Load | Load parameters from actual parameter file |
![]() ![]() | MoveToFilePath | Move actual parameter file to the new file. |
![]() ![]() | Remove | Retire une clé des paramètres |
![]() ![]() | Save | Save current parameters to actual parameter file |
![]() ![]() | ToJSON | Return the current parameters as a serialized JSON object. |
![]() ![]() | getFilePath | Return the absolute path to the parameter file (drive+folder+file name+extension) |
![]() ![]() | getValue | Overloaded. Get the JSON value for key parameter with nil as default value |
![]() ![]() | getValue | Overloaded. Get the TDateTime value for key parameter with December 30th 1899 at 12:00 as default value |
![]() ![]() | getValue | Overloaded. Get the single value for key parameter with zero as default value |
![]() ![]() | getValue | Overloaded. Get the cardinal value for key parameter with zero as default value |
![]() ![]() | getValue | Overloaded. Get the integer value for key parameter with zero as default value |
![]() ![]() | getValue | Overloaded. Get the boolean value for key parameter with False as default value |
![]() ![]() | getValue | Overloaded. Get the string value for key parameter with an empty string as default value |
![]() ![]() | setFilePath | Change the folder where is the parameter file. |
![]() ![]() | setFolderName | Change the folder where is the parameter file. |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as TJSONValue |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as TDateTime |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as single |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as cardinal |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as integer |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as boolean |
![]() ![]() | setValue | Overloaded. Set the value for key parameter as string |
TParams is here for compatibility with old projects.