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, it centralize data of all used TPropSaveMain components which uses it as interface to ini data
Hierarchy
Overview
Methods
|
procedure LoadFile(const AFileName: string); |
|
procedure LoadFromStream(Source: TStream); |
|
function SaveFile(const AFileName: string): boolean; |
|
function SaveFileSilent(const AFileName: string): boolean; |
|
procedure SaveToStream(Dest: TStream); |
|
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 DeleteStrings(const Key: string); |
|
procedure WriteFont(const Key: string; Font: TFont; ScaleRatio: Double = 1); |
|
procedure ReadFont(const Key: string; Font: TFont; ScaleRatio: Double = 1); |
|
procedure DeleteFont(const Key: string); |
|
procedure DoCompressFile(const OrigFileName, DestFileName: string; DeleteOrigFile: boolean); |
Properties
|
property DisableAll: boolean read FDisableAll write FDisableAll default false; |
|
property FileName: string read FFileName write SetFileName; |
|
property CompressFile: boolean read FCompressFile write SetCompressFile default false; |
|
property UseAsGlobalFile: boolean read FUseAsGlobalFile write SetUseAsGlobalFile default false; |
|
property OnLoadContent: TNotifyEvent read FOnLoadContent write FOnLoadContent; |
|
property OnSaveContent: TNotifyEvent read FOnSaveContent write FOnSaveContent; |
|
property OnReadValue: TReadValueEvent read FOnReadValue write FOnReadValue; |
|
property OnWriteValue: TWriteValueEvent read FOnWriteValue write FOnWriteValue; |
|
property OnGetIniFileEncoding: TGetEncodingEvent read FGetIniFileEncoding write FGetIniFileEncoding; |
Description
Methods
|
procedure LoadFile(const AFileName: string); |
load ini file from disk
|
|
procedure LoadFromStream(Source: TStream); |
load ini file from stream
|
|
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
|
|
procedure SaveToStream(Dest: TStream); |
save ini file to stream
|
|
function SectionExists(const Section: string): boolean; |
define whether section exists in ini file
|
|
function ValueExists(const Section, Ident: string): boolean; |
define whether value exists 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 from the section
|
|
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 of 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 DeleteStrings(const Key: string); |
|
|
procedure WriteFont(const Key: string; Font: TFont; ScaleRatio: Double = 1); |
|
|
procedure ReadFont(const Key: string; Font: TFont; ScaleRatio: Double = 1); |
|
|
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, in runtime use LoadFile and SaveFile to change current 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 OnLoadContent: TNotifyEvent read FOnLoadContent write FOnLoadContent; |
event is called to load ini content, if not defined then standard ini file is used
|
|
property OnSaveContent: TNotifyEvent read FOnSaveContent write FOnSaveContent; |
event is called to save ini content, if not defined then standard ini file is used
|
|
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.15.0.
|