procedure TIniOptions.LoadSettings(Ini: TIniFile);
begin
if Ini <> nil then
begin
{Section: 接收发送延时}
FInceptDelay := Ini.ReadString(csIniJSFSYSSection, csIniInceptDelay, '300');
end;
end;
procedure TIniOptions.LoadFromFile(const FileName: string);
var
Ini: TIniFile;
begin
// if FileExists(FileName) then //注释掉此句,在不存在FileName时程序才能调用到默认值,否则根本不调用LoadSettings
begin
Ini := TIniFile.Create(FileName);
try
LoadSettings(Ini);
finally
Ini.Free;
end;
end;
end;Author:
Passion Time: 2009-2-13 23:47