unit2.pas

来自「stbconvert103 with source」· PAS 代码 · 共 61 行

PAS
61
字号
unit Unit2;

interface

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

type
  TForm2 = class(TForm)
    ComboBox1: TComboBox;
    Button1: TButton;
    Label1: TLabel;
    Button2: TButton;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    procedure start(Sender: TObject);
    procedure change(Sender: TObject);
    procedure away(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.start(Sender: TObject);
begin
form2.Visible:=false;
form1.openbinfile;
end;
procedure TForm2.change(Sender: TObject);
begin
if combobox1.ItemIndex>=0 then button1.enabled:=true else exit;
if label1.Caption='Chip: Conexant' then
begin
if (combobox1.ItemIndex=2) or (combobox1.ItemIndex=4) or (combobox1.ItemIndex=6) or
   (combobox1.ItemIndex=13) or (combobox1.ItemIndex=14) or (combobox1.ItemIndex=15) then begin
   button1.enabled:=false; showmessage('Incompatible model!'); end;
end;
if label1.Caption='Chip: STI5518' then
 if (combobox1.ItemIndex<>2) and (combobox1.ItemIndex<>4) and (combobox1.ItemIndex<>6) and
   (combobox1.ItemIndex<>13) and (combobox1.ItemIndex<>14) and (combobox1.ItemIndex<>15) then begin
   button1.enabled:=false; showmessage('Incompatible model!'); end;
end;

procedure TForm2.away(Sender: TObject);
begin
form2.Visible:=false;
end;

end.

⌨️ 快捷键说明

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