unit2.pas

来自「随便写的很难看」· PAS 代码 · 共 117 行

PAS
117
字号
unit Unit2;

interface

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

type
  TForm2 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    Memo1: TMemo;
    Button1: TButton;
    Memo2: TMemo;
    GroupBox1: TGroupBox;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    RadioButton4: TRadioButton;
    RadioButton5: TRadioButton;
    RadioButton6: TRadioButton;
    RadioButton7: TRadioButton;
    RadioButton8: TRadioButton;
    RadioButton9: TRadioButton;
    RadioButton10: TRadioButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
     close;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
     if RadioButton1.Checked then
        begin
             Form1.Button13.Enabled:=false;
             Form1.A1.Enabled:=false;
             close;
        end;
     if RadioButton2.Checked then
        begin
             Form1.Button14.Enabled:=false;
             Form1.N5.Enabled:=false;
             close;
        end;
     if RadioButton3.Checked then
        begin
             Form1.Button15.Enabled:=false;
             Form1.N6.Enabled:=false;
             close;
        end;
     if RadioButton4.Checked then
        begin
             Form1.Button16.Enabled:=false;
             Form1.N7.Enabled:=false;
             close;
        end;
     if RadioButton9.Checked then
        begin
             Form1.Button17.Enabled:=false;
             Form1.N8.Enabled:=false;
             close;
        end;
     if RadioButton5.Checked then
        begin
             Form1.Button13.Enabled:=true;
             Form1.A1.Enabled:=true;
             close;
        end;
     if RadioButton6.Checked then
        begin
             Form1.Button14.Enabled:=true;
             Form1.N5.Enabled:=true;
             close;
        end;
     if RadioButton7.Checked then
        begin
             Form1.Button15.Enabled:=true;
             Form1.N6.Enabled:=true;
             close;
        end;
     if RadioButton8.Checked then
        begin
             Form1.Button16.Enabled:=true;
             Form1.N7.Enabled:=true;
             close;
        end;
     if RadioButton10.Checked then
        begin
             Form1.Button17.Enabled:=true;
             Form1.N8.Enabled:=true;
             close;
        end;

end;

end.

⌨️ 快捷键说明

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