SMBIOS ver 1.0

This commit is contained in:
2024-12-19 20:58:54 +09:00
parent a271945eae
commit ed58fc0eea
11 changed files with 9133 additions and 1 deletions
+185
View File
@@ -0,0 +1,185 @@
object frmMain: TfrmMain
Left = 0
Top = 0
BorderIcons = [biSystemMenu]
Caption = 'SMBIOS '#49368#54540
ClientHeight = 583
ClientWidth = 504
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
Position = poDesktopCenter
TextHeight = 15
object lcMain: TdxLayoutControl
Left = 0
Top = 0
Width = 504
Height = 583
Align = alClient
TabOrder = 0
LayoutLookAndFeel = dxLayoutSkinLookAndFeel1
ExplicitWidth = 531
ExplicitHeight = 466
object btnGetSn: TcxButton
Left = 12
Top = 526
Width = 480
Height = 35
Caption = #49884#47532#50620#45336#48260' '#52628#52636
TabOrder = 5
OnClick = btnGetSnClick
end
object teCpuSerialNum: TcxTextEdit
Left = 75
Top = 88
AutoSize = False
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 0
Height = 25
Width = 417
end
object teMbSerialNum: TcxTextEdit
Left = 75
Top = 120
AutoSize = False
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 1
Height = 25
Width = 417
end
object teHddSerialNum: TcxTextEdit
Left = 75
Top = 152
AutoSize = False
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 2
Height = 25
Width = 417
end
object teNetworkMac: TcxTextEdit
Left = 75
Top = 184
AutoSize = False
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 3
Height = 25
Width = 417
end
object mmLog: TcxMemo
Left = 12
Top = 226
Properties.ScrollBars = ssVertical
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 4
Height = 266
Width = 480
end
object lgRoot: TdxLayoutGroup
AlignHorz = ahClient
AlignVert = avClient
Hidden = True
ItemIndex = 5
ShowBorder = False
Index = -1
end
object dxLayoutItem1: TdxLayoutItem
Parent = lgRoot
Padding.Bottom = 10
Padding.AssignedValues = [lpavBottom]
CaptionOptions.Text = 'cxButton1'
CaptionOptions.Visible = False
Control = btnGetSn
ControlOptions.OriginalHeight = 35
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 7
end
object dxLayoutItem2: TdxLayoutItem
Parent = lgRoot
CaptionOptions.Text = 'CPU'
Control = teCpuSerialNum
ControlOptions.OriginalHeight = 25
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 1
end
object dxLayoutItem3: TdxLayoutItem
Parent = lgRoot
CaptionOptions.Text = 'Mainboard'
Control = teMbSerialNum
ControlOptions.OriginalHeight = 25
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 2
end
object dxLayoutItem4: TdxLayoutItem
Parent = lgRoot
CaptionOptions.Text = 'HDD'
Control = teHddSerialNum
ControlOptions.OriginalHeight = 25
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 3
end
object dxLayoutLabeledItem1: TdxLayoutLabeledItem
Parent = lgRoot
Padding.Bottom = 10
Padding.Top = 10
Padding.AssignedValues = [lpavBottom, lpavTop]
CaptionOptions.AlignHorz = taCenter
CaptionOptions.Text = '[SIZE=20][B]SMBIOS '#49884#47532#50620' '#45336#48260'[/B][/SIZE]'
Index = 0
end
object dxLayoutEmptySpaceItem1: TdxLayoutEmptySpaceItem
Parent = lgRoot
SizeOptions.Height = 20
SizeOptions.Width = 10
CaptionOptions.Text = 'Empty Space Item'
Index = 6
end
object dxLayoutItem5: TdxLayoutItem
Parent = lgRoot
CaptionOptions.Text = 'LAN'
Control = teNetworkMac
ControlOptions.OriginalHeight = 25
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 4
end
object dxLayoutItem6: TdxLayoutItem
Parent = lgRoot
AlignVert = avClient
Padding.Top = 10
Padding.AssignedValues = [lpavTop]
CaptionOptions.Text = 'cxMemo1'
CaptionOptions.Visible = False
Control = mmLog
ControlOptions.OriginalHeight = 89
ControlOptions.OriginalWidth = 185
ControlOptions.ShowBorder = False
Index = 5
end
end
object dxLayoutLookAndFeelList: TdxLayoutLookAndFeelList
Left = 56
Top = 16
object dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel
PixelsPerInch = 96
end
end
object scMain: TdxSkinController
NativeStyle = False
SkinName = 'WXI'
SkinPaletteName = 'Clearness'
Left = 16
Top = 16
end
end
+62
View File
@@ -0,0 +1,62 @@
unit MainForm;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Menus,
{ DevExpress}
cxGraphics, dxUIAClasses, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
dxSkinsCore, dxSkinWXI, dxLayoutControlAdapters, dxLayoutcxEditAdapters, cxContainer,
cxEdit, dxLayoutContainer, cxTextEdit, cxButtons, cxClasses, dxLayoutControl,
dxCore, dxSkinsForm, dxLayoutLookAndFeels, cxMemo;
type
TfrmMain = class(TForm)
lgRoot: TdxLayoutGroup;
lcMain: TdxLayoutControl;
btnGetSn: TcxButton;
dxLayoutItem1: TdxLayoutItem;
teCpuSerialNum: TcxTextEdit;
dxLayoutItem2: TdxLayoutItem;
teMbSerialNum: TcxTextEdit;
dxLayoutItem3: TdxLayoutItem;
teHddSerialNum: TcxTextEdit;
dxLayoutItem4: TdxLayoutItem;
dxLayoutLabeledItem1: TdxLayoutLabeledItem;
dxLayoutEmptySpaceItem1: TdxLayoutEmptySpaceItem;
teNetworkMac: TcxTextEdit;
dxLayoutItem5: TdxLayoutItem;
dxLayoutLookAndFeelList: TdxLayoutLookAndFeelList;
dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel;
scMain: TdxSkinController;
mmLog: TcxMemo;
dxLayoutItem6: TdxLayoutItem;
procedure btnGetSnClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
uses
GO2.SMBios;
procedure TfrmMain.btnGetSnClick(Sender: TObject);
begin
teCpuSerialNum.Text:= GetCPUSerialNumber;
teMbSerialNum.Text:= GetMainboardSerialNumber;
teHddSerialNum.Text:= GetHDDSerialNumber;
teNetworkMac.Text:= GetNetworkAdapterSerialNumber;
mmLog.Text:= GetHardwareInformation;
end;
end.