{ **************************************************************************** | YCFG Unit Version 2.00 | | | | Copyright (c) 2006 by Yeminy | | Copyright (c) 2006 by Rylon | | | | 151 Function/Procedures | | | | 151 Done : 0 ToDo >>> 100,00% Done : 0,00% ToDO | | | | 4 Tested : 151 ToDo >>> 0,00% Done : 100,00% ToDo | | | **************************************************************************** **************************************************************************** | License: | | | **************************************************************************** **************************************************************************** | ToDo: Falls es viele Keys gibt, alle in einer Liste ausgeben | | Bsp: test=2135123 | | test=213ds435dsf | | | **************************************************************************** **************************************************************************** | ChangeLog: | | -started project ycfg 2 | **************************************************************************** } unit ycfg; interface uses SysUtils, Classes, windows, Graphics, ycode; // OTHER************************************************************************************************************************* //-- //-- //sections //-- function setYcfgSections(YcfgFile,Sections:string;OverrideExisting:boolean):boolean; overload; //w function setYcfgSections(var YcfgFile:TStringlist;Sections:string;OverrideExisting:boolean):boolean; overload; //w function setYcfgSections(YcfgFile:string;Sections:TStringList;OverrideExisting:boolean):boolean; overload; //w function setYcfgSections(var YcfgFile,Sections:TStringlist;OverrideExisting:boolean):boolean; overload; //w //-- function setYcfgSection(YcfgFile,Section,Value:string;OverrideExisting:boolean):boolean; overload; //w function setYcfgSection(var YcfgFile:TStringList;Section,Value:string;OverrideExisting:boolean):boolean; overload; //w function setYcfgSection(YcfgFile,Section:string;Value:TStringList;OverrideExisting:Boolean):boolean; overload; //w function setYcfgSection(var YcfgFile:TStringlist;Section:string;Value:TStringList;OverrideExisting:Boolean):boolean; overload; //w //-- // Add*************************************************************************************************************************** //-- //-- //global //-- //procedure addYcfgSpaceLine(YcfgFile:string); overload; // //procedure addYcfgSpaceLine(var YcfgFile:Tstringlist); overload; // //procedure addYcfgSpaceLine(YcfgFile:string;Position:integer); overload; // //procedure addYcfgSpaceLine(var YcfgFile:Tstringlist;Position:integer); overload; // //Section //-- //procedure addYcfgSecSpaceLine(YcfgFile,Section:string); overload; // //procedure addYcfgSecSpaceLine(var YcfgFile:Tstringlist;Section:string;); overload; // //procedure addYcfgSecSpaceLine(YcfgFile,Section:string;Position:integer); overload; // //procedure addYcfgSecSpaceLine(var YcfgFile:Tstringlist;Section:string;Position:integer); overload; // //-- //gloabl //-- //procedure addYcfgComment(YcfgFile,Value:string); overload; // //procedure addYcfgComment(var YcfgFile:Tstringlist;Value:string); overload; // //procedure addYcfgComment(YcfgFile:string;Position:integer;Value:string); overload; // //procedure addYcfgComment(var YcfgFile:Tstringlist;Position:integer;Value:string); overload; // //Section //-- //procedure addYcfgSecComment(YcfgFile,Section,Value:string); overload; // //procedure addYcfgSecComment(var YcfgFile:Tstringlist;Section,Value:string); overload; // //procedure addYcfgSecComment(YcfgFile,Section:string;Position:integer;Value:string); overload; // //procedure addYcfgSecComment(var YcfgFile:Tstringlist;Section:string;Position:integer;Value:string); overload; // implementation function isStringIncluded(SourceString,SearchString,DivideParam:String):boolean; overload; var i:Integer; begin Result:=False; for i:=1 to getStringDivides(SourceString,DivideParam) do begin if DivideAString(SourceString,DivideParam,i)=SearchString then begin Result:=true; Exit; end; end; end; function isStringIncluded(SourceString,SearchString:String):boolean; overload; begin Result:=isStringIncluded(SourceString,SearchString,StringDivideParam); end; function DivideAString(SourceString,DivideParam:string;Position:integer):string; overload; var i:integer; lastDivide:Integer; dividecount:Integer; begin Result:=''; if getStringDivides(SourceString,DivideParam)<=0 then Exit; lastDivide:=1; dividecount:=0; for i:=1 to length(SourceString) do begin if LowerCase(copy(SourceString,i,Length(DivideParam)))=LowerCase(DivideParam) then begin Inc(dividecount); if Position=dividecount then begin Result:=Copy(SourceString,lastdivide,i-lastdivide); Exit; end; lastDivide:=i+length(DivideParam); end; end; if dividecount>=Position-1 then Result:=Copy(SourceString,lastdivide,Length(SourceString)); end; function DivideAString(SourceString:string;Position:integer):string; overload; begin Result:=DivideAString(SourceString,StringDivideParam,Position); end; function getStringDivides(SourceString,DivideParam:string):integer; overload; var i:integer; begin Result:=0; if Length(SourceString)<=0 then Exit; for i:=1 to length(SourceString) do begin if LowerCase(Copy(SourceString,i,Length(DivideParam)))=LowerCase(DivideParam) then Inc(Result); end; if LowerCase(Copy(SourceString,Length(SourceString)-length(DivideParam)+1,length(DivideParam)))<>LowerCase(DivideParam) then Inc(Result); end; function getStringDivides(SourceString:string):integer; overload; begin Result:=getStringDivides(SourceString,StringDivideParam); end; function getYcfgSections(YcfgFile:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgSections(sl); sl.Free; end; function getYcfgSections(YcfgFile:TStringlist):TStringList; overload; var i:Integer; begin Result:=TStringList.Create; for i:=0 to YcfgFile.Count-1 do begin if LowerCase(Copy(YcfgFile.Strings[i],1,Length(YcfgSectionInit)))=LowerCase(YcfgSectionInit) then Result.Add(copy(DivideAString(YcfgFile.strings[i],']',1),2,Length(YcfgFile.strings[i]))); end; end; function getYcfgSection(YcfgFile,Section:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgSection(sl,Section); sl.Free; end; function getYcfgSection(YcfgFile:TStringlist;Section:string):TStringList; overload; var i:Integer; check:Boolean; begin Result:=TStringList.Create; check:=False; for i:=0 to YcfgFile.Count-1 do begin if (LowerCase(Copy(YcfgFile.Strings[i],1,Length(YcfgSectionInit+Section+YcfgSectionEnd)))=LowerCase(YcfgSectionInit+Section+YcfgSectionEnd)) and not check then check:=True; if (LowerCase(Copy(YcfgFile.Strings[i],1,Length(YcfgSectionInit)))=LowerCase(YcfgSectionInit)) and check then check:=false else if check then Result.Add(YcfgFile.Strings[i]); end; end; function getYcfgSectionText(YcfgFile,Section:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgSectionText(sl,Section); sl.Free; end; function getYcfgSectionText(YcfgFile:TStringlist;Section:string):TStringList; overload; begin Result:=getYcfgSection(YcfgFile,Section); Result.Delete(0); end; function getYcfgSectionKeys(YcfgFile,Section,DivideParam:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if fileexists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgSectionKeys(sl,Section,DivideParam); sl.Free; end; function getYcfgSectionKeys(YcfgFile,Section:string):TStringList; overload; begin Result:=getYcfgSectionKeys(YcfgFile,Section,YcfgDivideParam); end; function getYcfgSectionKeys(YcfgFile:TStringlist;Section,DivideParam:string):TStringList; overload; var sl:TStringList; i,j:Integer; check:Boolean; begin Result:=TStringList.Create; sl:=TStringList.Create; sl:=getYcfgSection(YcfgFile,Section); for i:=0 to sl.count-1 do begin check:=False; for j:=1 to Length(sl.Strings[i]) do begin if LowerCase(Copy(sl.Strings[i],j,Length(DivideParam)))=LowerCase(DivideParam) then check:=True; end; if check then Result.Add(DivideAString(sl.Strings[i],DivideParam,1)); end; sl.Free; end; function getYcfgSectionKeys(YcfgFile:TStringlist;Section:string):TStringList; overload; begin Result:=getYcfgSectionKeys(YcfgFile,Section,YcfgDivideParam); end; function getYcfgSectionValues(YcfgFile,Section,DivideParam:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgSectionValues(sl,Section,DivideParam); sl.Free; end; function getYcfgSectionValues(YcfgFile,Section:string):TStringList; overload; begin Result:=getYcfgSectionValues(YcfgFile,Section,YcfgDivideParam); end; function getYcfgSectionValues(YcfgFile:TStringlist;Section,DivideParam:string):TStringList; overload; var sl:TStringList; i,j:Integer; check:Boolean; begin Result:=TStringList.Create; sl:=TStringList.Create; sl:=getYcfgSection(YcfgFile,Section); for i:=0 to sl.count-1 do begin check:=False; for j:=1 to Length(sl.Strings[i]) do begin if LowerCase(Copy(sl.Strings[i],j,Length(DivideParam)))=LowerCase(DivideParam) then check:=True; end; if check then Result.Add(DivideAString(sl.Strings[i],DivideParam,2)); end; sl.Free; end; function getYcfgSectionValues(YcfgFile:TStringlist;Section:string):TStringList; overload; begin Result:=getYcfgSectionValues(YcfgFile,Section,YcfgDivideParam); end; function getYcfgSectionNoKeys(YcfgFile,Section,DivideParam:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgSectionNoKeys(sl,Section,DivideParam); sl.Free; end; function getYcfgSectionNoKeys(YcfgFile,Section:string):TStringList; overload; begin Result:=getYcfgSectionNoKeys(YcfgFile,Section,YcfgDivideParam); end; function getYcfgSectionNoKeys(YcfgFile:TStringlist;Section,DivideParam:string):TStringList; overload; var sl:TStringList; i,j:Integer; check:boolean; begin Result:=TStringList.Create; sl:=TStringList.Create; sl:=getYcfgSection(YcfgFile,Section); for i:=0 to sl.count-1 do begin check:=False; for j:=1 to Length(sl.Strings[i]) do begin if LowerCase(Copy(sl.Strings[i],j,Length(DivideParam)))=LowerCase(DivideParam) then check:=True; end; if not check then Result.Add(sl.Strings[i]); end; sl.Free; end; function getYcfgSectionNoKeys(YcfgFile:TStringlist;Section:string):TStringList; overload; begin Result:=getYcfgSectionNoKeys(YcfgFile,Section,YcfgDivideParam); end; procedure createYcfgSection(YcfgFile,Section:string); overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); createYcfgSection(sl,Section); sl.SaveToFile(YcfgFile); sl.Free; end; procedure createYcfgSection(var YcfgFile:TStringlist;Section:string); overload; var sl:TStringList; i:integer; begin sl:=TStringList.Create; sl:=getYcfgSections(YcfgFile); for i:=0 to sl.Count-1 do if LowerCase(sl.Strings[i])=LowerCase(Section) then Exit; YcfgFile.Add(YcfgSectionInit+Section+YcfgSectionEnd); sl.Free; end; procedure delYcfgSection(YcfgFile,Section:string); overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); delYcfgSection(sl,Section); sl.SaveToFile(YcfgFile); sl.Free; end; procedure delYcfgSection(var YcfgFile:TStringlist;Section:string); overload; var Point:TPoint; i:Integer; begin Point:=getYcfgSectionPos(YcfgFile,Section); if (point.X=-1) or (Point.Y=-1) or (Point.Y0 then if Copy(YcfgFile.Strings[0],1,2)='$$' then Result:=YcfgFile.Strings[0]; end; function checkYcfgHeader(YcfgFile:string):boolean; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=checkYcfgHeader(sl); sl.Free; end; function checkYcfgHeader(YcfgFile:TStringlist):boolean; overload; begin Result:=false; if YcfgFile.Count>0 then if LowerCase(YcfgFile.Strings[0])=LowerCase(YcfgHeader) then Result:=true; end; procedure writeYcfgHeader(YcfgFile:string); overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); writeYcfgHeader(sl); sl.SaveToFile(YcfgFile); sl.Free; end; procedure writeYcfgHeader(YcfgFile:TStringlist); overload; begin if readYcfgHeader(YcfgFile)<>'' then YcfgFile.Insert(0,YcfgHeader) else YcfgFile.Strings[0]:=YcfgHeader; end; function getYcfgVersion:string; begin Result:=YcfgVersion; end; procedure clearYcfgList(YcfgFile,ListHeader:string); overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); clearYcfgList(sl,ListHeader); sl.SaveToFile(YcfgFile); sl.Free; end; procedure clearYcfgList(var YcfgFile:TStringlist;ListHeader:string); overload; var Point:TPoint; i:Integer; begin Point:=getYcfgListPos(YcfgFile,ListHeader); if (point.X=-1) or (Point.Y=-1) or (Point.YLowerCase(ListHeader) then YcfgFile[Point.X+1]:=ListHeader; end; procedure delYcfgList(YcfgFile,ListHeader:string); overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); delYcfgList(sl,ListHeader); sl.SaveToFile(YcfgFile); sl.Free; end; procedure delYcfgList(var YcfgFile:TStringlist;ListHeader:string); overload; var Point:TPoint; i:Integer; begin Point:=getYcfgListPos(YcfgFile,ListHeader); if (point.X=-1) or (Point.Y=-1) or (Point.Y-1) and (Point.Y>-1) then Result:=True; end; function getYcfgList(YcfgFile,ListHeader:string):TStringList; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=getYcfgList(sl,ListHeader); sl.Free; end; function getYcfgList(YcfgFile:TStringlist;ListHeader:string):TStringList; overload; var i:Integer; Point:TPoint; begin Result:=TStringList.Create; Point:=getYcfgListPos(YcfgFile,ListHeader); if (point.X=-1) or (Point.Y=-1) or (Point.YLowerCase(ListHeader) then Result.Add(YcfgFile[Point.Y]); end; function setYcfgList(YcfgFile,ListHeader:string;List:TStringList;OverrideExisting:boolean):Boolean; overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); Result:=setYcfgList(sl,ListHeader,List,OverrideExisting); sl.SaveToFile(YcfgFile); sl.Free; end; function setYcfgList(var YcfgFile:TStringlist;ListHeader:string;List:TStringList;OverrideExisting:boolean):Boolean; overload; var Point:TPoint; i:Integer; begin Result:=false; Point:=getYcfgListPos(YcfgFile,ListHeader); if (point.X=-1) or (Point.Y=-1) or (Point.Y=j) and (j>=0) then YcfgFile.Strings[i]:=Searchstring+DivideParam+Value else YcfgFile.Add(Searchstring+DivideParam+Value); end; procedure setYcfgStr(var YcfgFile:Tstringlist;SearchString,Value:string); overload; begin setYcfgStr(YcfgFile,Searchstring,YcfgDivideParam,Value); end; procedure setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,Value:string); overload; var sl:TStringList; begin sl:=TStringList.Create; if FileExists(YcfgFile) then sl.LoadFromFile(YcfgFile); setYcfgSecStr(sl,Section,Searchstring,DivideParam,Value); sl.SaveToFile(YcfgFile); sl.Free; end; procedure setYcfgSecStr(YcfgFile,Section,SearchString,Value:string); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,Value); end; procedure setYcfgSecStr(var YcfgFile:Tstringlist;Section,SearchString,DivideParam,Value:string); overload; var i:Integer; point:TPoint; check:Boolean; begin point:=getYcfgSectionPos(YcfgFile,Section); check:=False; for i:=0 to YcfgFile.Count-1 do if LowerCase(Copy(YcfgFile.Strings[i],1,Length(Searchstring+Divideparam)))=LowerCase(Searchstring+DivideParam) then if (i>=Point.X) and (i<=Point.Y) then if (YcfgFile.Count>=i) and (i>=0) then begin YcfgFile.Strings[i]:=Searchstring+DivideParam+Value; check:=true; end; if not check then YcfgFile.Insert(Point.Y,Searchstring+DivideParam+Value); end; procedure setYcfgSecStr(var YcfgFile:Tstringlist;Section,SearchString,Value:string); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,Value); end; procedure setYcfgInt(YcfgFile,SearchString,DivideParam:string;Value:integer); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,IntToStr(Value)); end; procedure setYcfgInt(YcfgFile,SearchString:string;Value:integer); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,IntToStr(Value)); end; procedure setYcfgInt(var YcfgFile:Tstringlist;SearchString,DivideParam:string;Value:integer); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,IntToStr(Value)); end; procedure setYcfgInt(var YcfgFile:Tstringlist;SearchString:string;Value:integer); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,IntToStr(Value)); end; procedure setYcfgSecInt(YcfgFile,Section,SearchString,DivideParam:string;Value:integer); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,IntToStr(Value)); end; procedure setYcfgSecInt(YcfgFile,Section,SearchString:string;Value:integer); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,IntToStr(Value)); end; procedure setYcfgSecInt(var YcfgFile:Tstringlist;Section,SearchString,DivideParam:string;Value:integer); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,IntToStr(Value)); end; procedure setYcfgSecInt(var YcfgFile:Tstringlist;Section,SearchString:string;Value:integer); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,IntToStr(Value)); end; procedure setYcfgBool(YcfgFile,SearchString,DivideParam:string;Value:boolean); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,BoolToStr(Value)); end; procedure setYcfgBool(YcfgFile,SearchString:string;Value:boolean); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,BoolToStr(Value)); end; procedure setYcfgBool(var YcfgFile:Tstringlist;SearchString,DivideParam:string;Value:boolean); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,BoolToStr(Value)); end; procedure setYcfgBool(var YcfgFile:Tstringlist;SearchString:string;Value:boolean); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,BoolToStr(Value)); end; procedure setYcfgSecBool(YcfgFile,Section,SearchString,DivideParam:string;Value:boolean); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,BoolToStr(Value)); end; procedure setYcfgSecBool(YcfgFile,Section,SearchString:string;Value:boolean); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,BoolToStr(Value)); end; procedure setYcfgSecBool(var YcfgFile:Tstringlist;Section,SearchString,DivideParam:string;Value:boolean); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,BoolToStr(Value)); end; procedure setYcfgSecBool(var YcfgFile:Tstringlist;Section,SearchString:string;Value:boolean); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,BoolToStr(Value)); end; procedure setYcfgStrEnCrypted(YcfgFile,SearchString,DivideParam,Key,Value:string); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,EnCryptStr(Key,Value)); end; procedure setYcfgStrEnCrypted(YcfgFile,SearchString,Key,Value:string); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,EnCryptStr(Key,Value)); end; procedure setYcfgStrEnCrypted(var YcfgFile:Tstringlist;SearchString,DivideParam,Key,Value:string); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,EnCryptStr(Key,Value)); end; procedure setYcfgStrEnCrypted(var YcfgFile:Tstringlist;SearchString,Key,Value:string); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,EnCryptStr(Key,Value)); end; procedure setYcfgSecStrEnCrypted(YcfgFile,Section,SearchString,DivideParam,Key,Value:string); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,Divideparam,EnCryptStr(Key,Value)); end; procedure setYcfgSecStrEnCrypted(YcfgFile,Section,SearchString,Key,Value:string); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideparam,EnCryptStr(Key,Value)); end; procedure setYcfgSecStrEnCrypted(var YcfgFile:Tstringlist;Section,SearchString,DivideParam,Key,Value:string); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,Divideparam,EnCryptStr(Key,Value)); end; procedure setYcfgSecStrEnCrypted(var YcfgFile:Tstringlist;Section,SearchString,Key,Value:string); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideparam,EnCryptStr(Key,Value)); end; procedure setYcfgFont(YcfgFile,SearchString,DivideParam:string;Value:TFont); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgFont(YcfgFile,SearchString:string;Value:TFont); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgFont(var YcfgFile:Tstringlist;SearchString,DivideParam:string;Value:TFont); overload; begin setYcfgStr(YcfgFile,SearchString,DivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgFont(var YcfgFile:Tstringlist;SearchString:string;Value:TFont); overload; begin setYcfgStr(YcfgFile,SearchString,YcfgDivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgSecFont(YcfgFile,Section,SearchString,DivideParam:string;Value:TFont); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgSecFont(YcfgFile,Section,SearchString:string;Value:TFont); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgSecFont(var YcfgFile:Tstringlist;Section,SearchString,DivideParam:string;Value:TFont); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,DivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; procedure setYcfgSecFont(var YcfgFile:Tstringlist;Section,SearchString:string;Value:TFont); overload; begin setYcfgSecStr(YcfgFile,Section,SearchString,YcfgDivideParam,IntToStr(Value.Charset)+StringDivideParam+IntToStr(Value.Color)+StringDivideParam+Value.Name+StringDivideParam+IntToStr(Value.Size)+StringDivideParam+IntToStr(Integer(Value.Pitch))+StringDivideParam); end; end.