frmfunctionlistunit.pas.svn-base

来自「这是一段游戏修改工具的源代码.ring3功能由dephi开发,驱动是C开发.希望」· SVN-BASE 代码 · 共 60 行

SVN-BASE
60
字号
unit frmFunctionlistUnit;

interface

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

type
  TfrmFunctionList = class(TForm)
    ListBox1: TListBox;
    Panel1: TPanel;
    Button1: TButton;
    Label1: TLabel;
    procedure ListBox1DblClick(Sender: TObject);
  private
    { Private declarations }
    function getSelectedIndex: integer;
    function getFunction(index: integer): string;
  public
    { Public declarations }
    constructor create(AOwner: TComponent; functionList: TStrings);
    property itemindex: integer read getselectedindex;
    property functions[index: integer]: string read getFunction;

  end;

implementation

{$R *.dfm}

constructor TfrmFunctionList.create(AOwner: TComponent; functionList: TStrings);
begin
  inherited create(AOwner);

  listbox1.Items.AddStrings(functionlist);
end;

function TfrmFunctionlist.getFunction(index: integer):string;
begin
  if (index<0) or (index>=listbox1.Count) then
  begin
    result:='';
    exit;
  end else result:=listbox1.Items[index];

end;

function TfrmFunctionList.getSelectedIndex: integer;
begin
  result:=listbox1.ItemIndex;
end;

procedure TfrmFunctionList.ListBox1DblClick(Sender: TObject);
begin
  Button1.click;
end;

end.

⌨️ 快捷键说明

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