📄 untglobal.pas
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -