⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 urecord.pas

📁 搞笑俄罗斯方块这个程序由delphi制作而成。
💻 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 + -