📄 updatebios.pas
字号:
unit updatebios;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, ComCtrls;
type
Tupdateform = class(TForm)
Label1: TLabel;
Label2: TLabel;
ProgressBar1: TProgressBar;
Button1: TButton;
Button2: TButton;
Timer1: TTimer;
procedure Button2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
updateform: Tupdateform;
i:byte;
implementation
uses logo, wflash;
{$R *.DFM}
procedure Tupdateform.Button2Click(Sender: TObject);
begin
close
end;
procedure Tupdateform.Timer1Timer(Sender: TObject);
begin
ProgressBar1.Position:=ProgressBar1.Position+1;
if i<1 then
label1.caption:='正在清除主要模块...';
label2.caption:='%'+inttostr(ProgressBar1.Position);
if ProgressBar1.Position=100 then
begin
timer1.Interval:=50;
inc(i);
ProgressBar1.Position:=0;
if winform.checkbox1.checked then
label1.caption:='应用程序模块...';
if winform.checkbox2.checked then
label1.caption:='verifying 主要模块';
label1.caption:='正在更新 BIOS 信息';
if i=2 then
begin
hide;
timer1.enabled:=false;
if Application.MessageBox(#13#10+#13#10+' BIOS 已经安全的完成! '+#13#10+#13#10+
' BIOS 设置将在下次启动时生效 '+#13#10+#13#10+' 你要重新引导系统吗? '+#13#10+#13#10,'重新引导',MB_yesno)=idyes then
begin
logoform:=tlogoform.create(application);
logoform.showmodal;
end;
close;
end;
end;
end;
procedure Tupdateform.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;
procedure Tupdateform.Button1Click(Sender: TObject);
begin
i:=0;
button1.Visible:=false;
button2.Visible:=false;
timer1.Enabled:=true;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -