📄 peftag.pas
字号:
unit PefTag;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, Buttons, PeTag;
type
TTagForm = class(TForm)
ListBoxTags: TListBox;
EditTag: TEdit;
LabelComp: TLabel;
BtnApply: TBitBtn;
BtnClose: TBitBtn;
Bevel1: TBevel;
procedure ListBoxTagsClick(Sender: TObject);
procedure BtnApplyClick(Sender: TObject);
private
{ Private declarations }
public
Pe: TTagMultiProperty;
procedure UpdateList;
end;
implementation
{$R *.DFM}
procedure TTagForm.UpdateList;
var
I: Integer;
begin
// fill the listbox
ListBoxTags.Items.Clear;
for I := 0 to Pe.PropCount - 1 do
with Pe.GetComponent (I) as TComponent do
ListBoxTags.Items.Add (
Format ('%s: %d', [Name, Tag]));
end;
procedure TTagForm.ListBoxTagsClick(Sender: TObject);
begin
with Pe.GetComponent (ListBoxTags.ItemIndex)
as TComponent do
begin
LabelComp.Caption := Name;
EditTag.Text := IntToStr (Tag);
end;
end;
procedure TTagForm.BtnApplyClick(Sender: TObject);
begin
with Pe.GetComponent (ListBoxTags.ItemIndex)
as TComponent do
Tag := StrToInt (EditTag.Text);
UpdateList;
Pe.Designer.Modified;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -