unit_sel.pas

来自「电力系统IEC 103规约通信程序」· PAS 代码 · 共 66 行

PAS
66
字号
unit Unit_sel;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Buttons, StdCtrls, ComCtrls,
  Unit1_S103,Unit1_SLFP,Unit1_SNZ94,Unit1_SN4F,
  Unit1_N103,Unit1_NLFP,Unit1_NNZ94,Unit1_NN4F;

type
  TForm_Sel = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    ComboBox1: TComboBox;
    Label3: TLabel;
    Label1: TLabel;
    ComboBox2: TComboBox;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form_Sel: TForm_Sel;

implementation

{$R *.DFM}


procedure TForm_Sel.BitBtn1Click(Sender: TObject);
var
 str:string;
begin
  if pagecontrol1.activepage=tabsheet1 then
  case combobox1.itemindex of
    0: form1_S103.show;
    1: form1_SLFP.show;
    2: form1_SNZ94.show;
    3: form1_SN4F.show;
  end
  else
  case combobox2.itemindex of
    0: form1_N103.show;
    1: form1_NLFP.show;
    2: form1_NNZ94.show;
    3: form1_NN4F.show;
  end;

end;

procedure TForm_Sel.FormCreate(Sender: TObject);
begin
  combobox1.itemindex:=0;
  combobox2.itemindex:=0;
end;

end.

⌨️ 快捷键说明

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