Citation :typeCette petite chose est une classe qui permet de conserver et de travailler sur les données du fichier SkillLine.dbc. Vous pouvez constater que le nom des variables et des routines explique de façon simple ce à quoi cela sert, chose qui n'était pas très évidente dans la première méthode.
TSkillLineFichier = Class
private
//Nom du fichier
Nom : string;
NbrChamp : Longword;
NbrTexte : Longword;
NbrEnregistrement : Longword;
TailleEnregistrement : Longword;
//taille du texte du fichier
TailleTexte : Longword ;
// Données des Champs
DataChamp : TList;
// Liste des champs
InfoChampDBC : TStringGrid;
// Liste des textes
ListTexte : TStringList;
//procedure Lire_Dbc_IniDBC();
//procedure Ecrire_Dbc_IniDBC();
public
Constructor Create;
procedure SetNom(Const sChaine : string);
Function GetNom : string;
procedure SetNbrChamp(Const lNbr : Longword);
Function GetNbrChamp : Longword;
procedure SetNbrEnregistrement(Const lNbr : Longword);
Function GetNbrEnregistrement : Longword;
procedure SetNbrTexte(Const lNbr : Longword);
Function GetNbrTexte : Longword;
procedure SetRecord(Const lNbr : Longword ; Const TRec : TSkillLine);
Function GetRecord(Const lNbr : Longword) : Pointer;
Function GetIndexID(Const lNbr : Longword) : Longword;
Function GetSkillLine(Const lNbr : Longword) : TRecSkillLine;
procedure SetAllDependance;
//procedure SetName(Const sName : String ; Const Idx : Longword);
Function GetName(Const Idx : Longword ; Const Rec : Longword) : String;
Function Lire_Fichier_DBC(Memo : Boolean) : Boolean;
procedure Lire_Dbc_IniDBC();
end;
Citation :Type
TEnteteF = record
Entete : array[0..3] of char;
NbrEnregistrement : Longword;
NbrChamp : Longword;
TailleEnregistrement : Longword;
TailleTexte : Longword;
end;
Citation :typeCette petite chose est une classe qui permet de conserver et de travailler sur les données du fichier SkillLine.dbc. Vous pouvez constater que le nom des variables et des routines explique de façon simple ce à quoi cela sert, chose qui n'était pas très évidente dans la première méthode.
TSkillLineFichier = Class
private
//Nom du fichier
Nom : string;
NbrChamp : Longword;
NbrTexte : Longword;
NbrEnregistrement : Longword;
TailleEnregistrement : Longword;
//taille du texte du fichier
TailleTexte : Longword ;
// Données des Champs
DataChamp : TList;
// Liste des champs
InfoChampDBC : TStringGrid;
// Liste des textes
ListTexte : TStringList;
//procedure Lire_Dbc_IniDBC();
//procedure Ecrire_Dbc_IniDBC();
public
Constructor Create;
procedure SetNom(Const sChaine : string);
Function GetNom : string;
procedure SetNbrChamp(Const lNbr : Longword);
Function GetNbrChamp : Longword;
procedure SetNbrEnregistrement(Const lNbr : Longword);
Function GetNbrEnregistrement : Longword;
procedure SetNbrTexte(Const lNbr : Longword);
Function GetNbrTexte : Longword;
procedure SetRecord(Const lNbr : Longword ; Const TRec : TSkillLine);
Function GetRecord(Const lNbr : Longword) : Pointer;
Function GetIndexID(Const lNbr : Longword) : Longword;
Function GetSkillLine(Const lNbr : Longword) : TRecSkillLine;
procedure SetAllDependance;
//procedure SetName(Const sName : String ; Const Idx : Longword);
Function GetName(Const Idx : Longword ; Const Rec : Longword) : String;
Function Lire_Fichier_DBC(Memo : Boolean) : Boolean;
procedure Lire_Dbc_IniDBC();
end;
Citation :Type
TEnteteF = record
Entete : array[0..3] of char;
NbrEnregistrement : Longword;
NbrChamp : Longword;
TailleEnregistrement : Longword;
TailleTexte : Longword;
end;