untglobal.pas
来自「车辆管理系统」· PAS 代码 · 共 43 行
PAS
43 行
unit untGlobal;
interface
Uses Sysutils, Forms, IniFiles;
function GetLogDir(RootDir:String):String;
function WriteSqlText(section,valueName,Valuestring:string):Boolean;
implementation
function GetLogDir(RootDir:String):String;
var
SAppPath:String;
begin
SAppPath:=ExtractfilePath(Application.ExeName);
If Copy(SappPath,Length(SappPath),1)='\' then
Delete(SappPath,length(SappPath),1);
while (Copy(SappPath,Length(SappPath),1)<>'\') and (Length(SappPath)>0) do
Delete(SappPath,length(SappPath),1);
if SappPath<>'' then
begin
if not DirectoryExists(SappPath+RootDir+'\') then
CreateDir(SappPath+RootDir+'\');
Result:=SappPath+RootDir+'\';
end
else
Result:='c:\';
end;
function WriteSqlText(section,valueName,Valuestring:string):Boolean;
var
myinifile:Tinifile;
myinifileName:string;
begin
Result:=False;
myinifilename:=GetLogDir('Log')+'sqltext.ini';
Myinifile:=Tinifile.Create(myinifilename);
Myinifile.WriteString(section,valueName,ValueString);
Myinifile.Free;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?