?? urecord.pas
字號:
{ 顯示高分記錄窗體單元 }
unit URecord;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, Registry;
type
THighScoreForm = class(TForm)
OKBtn: TButton;
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Name1: TLabel;
LabelScore1: TLabel;
Name2: TLabel;
LabelScore2: TLabel;
Name3: TLabel;
LabelScore3: TLabel;
Name4: TLabel;
LabelScore4: TLabel;
Name5: TLabel;
LabelScore5: TLabel;
ClearBtn: TButton;
procedure FormShow(Sender: TObject);
procedure ClearBtnClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure FlashScoreList;
end;
var
HighScoreForm: THighScoreForm;
implementation
uses URegMgr;
{$R *.DFM}
procedure THighScoreForm.FlashScoreList;
begin
Name1.Caption := RecInfo[1].Name;
Name2.Caption := RecInfo[2].Name;
Name3.Caption := RecInfo[3].Name;
Name4.Caption := RecInfo[4].Name;
Name5.Caption := RecInfo[5].Name;
LabelScore1.Caption := IntToStr(RecInfo[1].Score);
LabelScore2.Caption := IntToStr(RecInfo[2].Score);
LabelScore3.Caption := IntToStr(RecInfo[3].Score);
LabelScore4.Caption := IntToStr(RecInfo[4].Score);
LabelScore5.Caption := IntToStr(RecInfo[5].Score);
end;
procedure THighScoreForm.FormShow(Sender: TObject);
begin
FlashScoreList;
end;
procedure THighScoreForm.ClearBtnClick(Sender: TObject);
var
Reg: TRegistry;
begin
{ 操作注冊表 }
Reg := TRegistry.Create;
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey('Software\BlueGame',true);
InitRegistry(Reg);
LoadScore;
FlashScoreList;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -