Class TPropSaveFile

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPropSaveFile = class(TComponent)

Description

Enhanced TMemIniFile component which provides loading and saving of ini file, PropSaveMain component uses it as interface to INI data

Hierarchy

  • TComponent
  • TPropSaveFile

Overview

Methods

Public procedure LoadFile(const AFileName: string);
Public function SaveFile(const AFileName: string): boolean;
Public function SaveFileSilent(const AFileName: string): boolean;
Public function SectionExists(const Section: string): boolean;
Public function ValueExists(const Section, Ident: string): boolean;
Public procedure ReadSection(const Section: string; Strings: TStrings);
Public procedure WriteSection(const Section: string; Strings: TStrings);
Public procedure EraseSection(const Section: string);
Public procedure DeleteKey(const Section, Ident: String);
Public procedure Clear;
Public procedure GetStrings(List: TStrings);
Public procedure SetStrings(List: TStrings);
Public function GetSectionFromLine(const Line: string): string;
Public function GetFileName: string;
Public function ReadVariant(const Section, Ident: string; Default: variant): variant;
Public procedure WriteVariant(const Section, Ident: string; Value: variant);
Public function ReadString(const Section, Ident, Default: string): string;
Public procedure WriteString(const Section, Ident, Value: string);
Public function ReadInteger(const Section, Ident: string; Default: Longint): Longint;
Public procedure WriteInteger(const Section, Ident: string; Value: Longint);
Public function ReadWord(const Section, Ident: string; Default: Word): Word;
Public procedure WriteWord(const Section, Ident: string; Value: Word);
Public function ReadBool(const Section, Ident: string; Default: boolean): boolean;
Public procedure WriteBool(const Section, Ident: string; Value: boolean);
Public function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime;
Public procedure WriteDateTime(const Section, Ident: string; Value: TDateTime);
Public function ReadFloat(const Section, Ident: string; Default: Double): Double;
Public procedure WriteFloat(const Section, Ident: string; Value: Double);
Public procedure WriteStrings(const Key: string; L: TStrings);
Public procedure ReadStrings(const Key: string; L: TStrings);
Public procedure WriteFont(const Key: string; Font: TFont);
Public procedure ReadFont(const Key: string; Font: TFont);
Public procedure DeleteFont(const Key: string);
Public procedure DoCompressFile(const OrigFileName, DestFileName: string; DeleteOrigFile: boolean);

Properties

Published property DisableAll: boolean read FDisableAll write FDisableAll default false;
Published property FileName: string read FFileName write SetFileName;
Published property CompressFile: boolean read FCompressFile write SetCompressFile default false;
Published property OnReadValue: TReadValueEvent read FOnReadValue write FOnReadValue;
Published property OnWriteValue: TWriteValueEvent read FOnWriteValue write FOnWriteValue;

Description

Methods

Public procedure LoadFile(const AFileName: string);

load ini file from disk

Public function SaveFile(const AFileName: string): boolean;

save ini file to disk

Public function SaveFileSilent(const AFileName: string): boolean;

save ini file to disk, do not show error if saving fail

Public function SectionExists(const Section: string): boolean;

define whether section exist in ini file

Public function ValueExists(const Section, Ident: string): boolean;

define whether value exist in section in ini file

Public procedure ReadSection(const Section: string; Strings: TStrings);

read whole section to stringlist

Public procedure WriteSection(const Section: string; Strings: TStrings);

write whole section from stringlist

Public procedure EraseSection(const Section: string);

erase whole section - all values

Public procedure DeleteKey(const Section, Ident: String);

erase one key value

Public procedure Clear;

erase whole ini file

Public procedure GetStrings(List: TStrings);
 
Public procedure SetStrings(List: TStrings);
 
Public function GetSectionFromLine(const Line: string): string;
 
Public function GetFileName: string;
 
Public function ReadVariant(const Section, Ident: string; Default: variant): variant;
 
Public procedure WriteVariant(const Section, Ident: string; Value: variant);
 
Public function ReadString(const Section, Ident, Default: string): string;
 
Public procedure WriteString(const Section, Ident, Value: string);
 
Public function ReadInteger(const Section, Ident: string; Default: Longint): Longint;
 
Public procedure WriteInteger(const Section, Ident: string; Value: Longint);
 
Public function ReadWord(const Section, Ident: string; Default: Word): Word;
 
Public procedure WriteWord(const Section, Ident: string; Value: Word);
 
Public function ReadBool(const Section, Ident: string; Default: boolean): boolean;
 
Public procedure WriteBool(const Section, Ident: string; Value: boolean);
 
Public function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime;
 
Public procedure WriteDateTime(const Section, Ident: string; Value: TDateTime);
 
Public function ReadFloat(const Section, Ident: string; Default: Double): Double;
 
Public procedure WriteFloat(const Section, Ident: string; Value: Double);
 
Public procedure WriteStrings(const Key: string; L: TStrings);
 
Public procedure ReadStrings(const Key: string; L: TStrings);
 
Public procedure WriteFont(const Key: string; Font: TFont);
 
Public procedure ReadFont(const Key: string; Font: TFont);
 
Public procedure DeleteFont(const Key: string);
 
Public procedure DoCompressFile(const OrigFileName, DestFileName: string; DeleteOrigFile: boolean);
 

Properties

Published property DisableAll: boolean read FDisableAll write FDisableAll default false;

Defines whether re/storing is completely disabled

Published property FileName: string read FFileName write SetFileName;

Defines name of ini file

Published property CompressFile: boolean read FCompressFile write SetCompressFile default false;

Defines whether ini file is commpressed by zlib or bzip2 - see switch in _rosi.inc

Published property OnReadValue: TReadValueEvent read FOnReadValue write FOnReadValue;
 
Published property OnWriteValue: TWriteValueEvent read FOnWriteValue write FOnWriteValue;
 

Generated by PasDoc 0.13.0 on 2016-02-19 08:14:10