📄 unit_upate.pas
字号:
unit Unit_Upate;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, RzCommon;
type
TForm1 = class(TForm)
Label1: TLabel;
Button1: TButton;
RzRegIniFile1: TRzRegIniFile;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
appdir:string;
begin
try
appdir:=RzRegIniFile1.ReadString('fantast','SetDir','');
RenameFile(PChar(appdir+'\fantfore\fantfore.exe'),PChar(appdir+'\fantfore\fantforeMain.exe'));
CopyFile('FantFore.exe',PChar(appdir+'\fantfore\fantfore.exe'),True);
finally
ShowMessage('升级成功!');
close;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
win_dir:array[0..255] of Char;
begin
GetWindowsDirectory(@win_dir,40);
RzRegIniFile1.Path:=win_dir+'\win.ini';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -