📄 unt_updatefantfore.pas
字号:
unit Unt_UpdateFantFore;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, RzCommon, DB,ShellAPI, DBTables;
type
TFormFantFore = class(TForm)
Panel1: TPanel;
RzRegIniFile1: TRzRegIniFile;
Query1: TQuery;
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormFantFore: TFormFantFore;
implementation
{$R *.dfm}
procedure TFormFantFore.FormCreate(Sender: TObject);
var
win_dir:array[0..255] of Char;
begin
GetWindowsDirectory(@win_dir,40);
RzRegIniFile1.Path:=win_dir+'\win.ini';
end;
procedure TFormFantFore.FormShow(Sender: TObject);
var
appdir,dbname:string;
begin
try
RzRegIniFile1.WriteInteger('start','start',4852);
appdir:=RzRegIniFile1.ReadString('fantast','SetDir','');
if appdir='' then appdir:=Copy(ExtractFilePath(application.ExeName),1,Length(ExtractFilePath(application.ExeName))-9);
dbname:=appdir+'\data\menudb\workinfo.db';
with Query1 do
begin
close;
SQL.Clear;
sql.Add('update "'+dbname+'" set SODCOUNT=4852');
ExecSQL;
Close;
end;
ShellExecute(handle, 'open', 'fantforeMain.exe', nil, nil, SW_NORMAL);
finally
Close;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -