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

📄 umachid.pas

📁 详细的ERP设计资料
💻 PAS
字号:
unit uMachID;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TfrmExMachineID = class(TForm)
    GroupBox1: TGroupBox;
    chkUser: TCheckBox;
    chkSystem: TCheckBox;
    chkNetwork: TCheckBox;
    chkDrives: TCheckBox;
    btnGenerate: TButton;
    edtMachineID: TEdit;
    procedure btnGenerateClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmExMachineID: TfrmExMachineID;

implementation

{$R *.DFM}

uses
  OnGuard, OgUtil;

procedure TfrmExMachineID.btnGenerateClick(Sender: TObject);
var
  InfoSet : TEsMachineInfoSet;
  MachineID : Longint;
begin
  { initialize the machine information set }
  InfoSet := [];
  if chkUser.Checked then
    InfoSet := InfoSet + [midUser];
  if chkSystem.Checked then
    InfoSet := InfoSet + [midSystem];
  if chkNetwork.Checked then
    InfoSet := InfoSet + [midNetwork];
  if chkDrives.Checked then
    InfoSet := InfoSet + [midDrives];

  { create the machine ID and display in hex }
  MachineID := CreateMachineID(InfoSet);
  edtMachineID.Text := '$' + BufferToHex(MachineID, SizeOf(MachineID));
end;

end.
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -