Rosi ComponentsUnits Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Class TPropSaveFile
Unit
PropSaveMain
Declaration
type TPropSaveFile = class(TComponent)
Description
Non visual component which provides loading and saving of TMemIniFileEx file, PropSaveMain component uses it as interface to ini data
Hierarchy
Overview
Methods
 |
procedure LoadFile(const AFileName: string); |
 |
function SaveFile(const AFileName: string): boolean; |
 |
function SaveFileSilent(const AFileName: string): boolean; |
 |
function SectionExists(const Section: string): boolean; |
 |
function ValueExists(const Section, Ident: string): boolean; |
 |
procedure ReadSection(const Section: string; Strings: TStrings); |
 |
procedure WriteSection(const Section: string; Strings: TStrings); |
 |
procedure EraseSection(const Section: string); |
 |
procedure DeleteKey(const Section, Ident: String); |
 |
procedure Clear; |
 |
procedure GetStrings(List: TStrings); |
 |
procedure SetStrings(List: TStrings); |
 |
function GetSectionFromLine(const Line: string): string; |
 |
function GetFileName: string; |
 |
function ReadVariant(const Section, Ident: string; Default: variant): variant; |
 |
procedure WriteVariant(const Section, Ident: string; Value: variant); |
 |
function ReadString(const Section, Ident, Default: string): string; |
 |
procedure WriteString(const Section, Ident, Value: string); |
 |
function ReadInteger(const Section, Ident: string; Default: Longint): Longint; |
 |
procedure WriteInteger(const Section, Ident: string; Value: Longint); |
 |
function ReadWord(const Section, Ident: string; Default: Word): Word; |
 |
procedure WriteWord(const Section, Ident: string; Value: Word); |
 |
function ReadBool(const Section, Ident: string; Default: boolean): boolean; |
 |
procedure WriteBool(const Section, Ident: string; Value: boolean); |
 |
function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime; |
 |
procedure WriteDateTime(const Section, Ident: string; Value: TDateTime); |
 |
function ReadFloat(const Section, Ident: string; Default: Double): Double; |
 |
procedure WriteFloat(const Section, Ident: string; Value: Double); |
 |
procedure WriteStrings(const Key: string; L: TStrings); |
 |
procedure ReadStrings(const Key: string; L: TStrings); |
 |
procedure WriteFont(const Key: string; Font: TFont); |
 |
procedure ReadFont(const Key: string; Font: TFont); |
 |
procedure DeleteFont(const Key: string); |
 |
procedure DoCompressFile(const OrigFileName, DestFileName: string; DeleteOrigFile: boolean); |
Properties
Description
Methods
 |
procedure LoadFile(const AFileName: string); |
load ini file from disk
|
 |
function SaveFile(const AFileName: string): boolean; |
save ini file to disk
|
 |
function SaveFileSilent(const AFileName: string): boolean; |
save ini file to disk, do not show error if saving fail
|
 |
function SectionExists(const Section: string): boolean; |
define whether section exist in ini file
|
 |
function ValueExists(const Section, Ident: string): boolean; |
define whether value exist in section in ini file
|
 |
procedure ReadSection(const Section: string; Strings: TStrings); |
read whole section to stringlist
|
 |
procedure WriteSection(const Section: string; Strings: TStrings); |
write whole section from stringlist
|
 |
procedure EraseSection(const Section: string); |
erase whole section - all values
|
 |
procedure DeleteKey(const Section, Ident: String); |
erase one key value
|
 |
procedure Clear; |
erase whole ini file
|
 |
procedure GetStrings(List: TStrings); |
load IniFile content to List
|
 |
procedure SetStrings(List: TStrings); |
store List to IniFile content
|
 |
function GetSectionFromLine(const Line: string): string; |
find full section name according Line, mask with * can be used
|
 |
function GetFileName: string; |
return name fo INI file
|
 |
function ReadVariant(const Section, Ident: string; Default: variant): variant; |
|
 |
procedure WriteVariant(const Section, Ident: string; Value: variant); |
|
 |
function ReadString(const Section, Ident, Default: string): string; |
|
 |
procedure WriteString(const Section, Ident, Value: string); |
|
 |
function ReadInteger(const Section, Ident: string; Default: Longint): Longint; |
|
 |
procedure WriteInteger(const Section, Ident: string; Value: Longint); |
|
 |
function ReadWord(const Section, Ident: string; Default: Word): Word; |
|
 |
procedure WriteWord(const Section, Ident: string; Value: Word); |
|
 |
function ReadBool(const Section, Ident: string; Default: boolean): boolean; |
|
 |
procedure WriteBool(const Section, Ident: string; Value: boolean); |
|
 |
function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime; |
|
 |
procedure WriteDateTime(const Section, Ident: string; Value: TDateTime); |
|
 |
function ReadFloat(const Section, Ident: string; Default: Double): Double; |
|
 |
procedure WriteFloat(const Section, Ident: string; Value: Double); |
|
 |
procedure WriteStrings(const Key: string; L: TStrings); |
|
 |
procedure ReadStrings(const Key: string; L: TStrings); |
|
 |
procedure WriteFont(const Key: string; Font: TFont); |
|
 |
procedure ReadFont(const Key: string; Font: TFont); |
|
 |
procedure DeleteFont(const Key: string); |
|
 |
procedure DoCompressFile(const OrigFileName, DestFileName: string; DeleteOrigFile: boolean); |
compress original file and store as new file
|
Properties
 |
property DisableAll: boolean read FDisableAll write FDisableAll default false; |
Defines whether re/storing is completely disabled
|
 |
property FileName: string read FFileName write SetFileName; |
Defines name of ini file
|
 |
property CompressFile: boolean read FCompressFile write SetCompressFile default false; |
Defines whether ini file is commpressed, zlib or bzip2 is used according switch in _rosi.inc
|
 |
property UseAsGlobalFile: boolean read FUseAsGlobalFile write SetUseAsGlobalFile default false; |
Defines whether the component is used as global PropSaveFile for all other shared forms
|
 |
property OnReadValue: TReadValueEvent read FOnReadValue write FOnReadValue; |
event is called after reading of any value
|
 |
property OnWriteValue: TWriteValueEvent read FOnWriteValue write FOnWriteValue; |
event is called before writing of any value
|
 |
property OnGetIniFileEncoding: TGetEncodingEvent read FGetIniFileEncoding write FGetIniFileEncoding; |
event is called during creating of INI file to define used encoding
|
Generated by PasDoc 0.13.0 on 2016-10-19 12:18:59
|