uform_add_code.pas

来自「电话防伪系统」· PAS 代码 · 共 75 行

PAS
75
字号
unit Uform_add_code;

interface

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

type
  Tform_add_code = class(TForm)
    StaticText1: TStaticText;
    SpinEdit1: TSpinEdit;
    SpinEdit2: TSpinEdit;
    Panel1: TPanel;
    Image1: TImage;
    SpeedButton1: TSpeedButton;
    Bevel1: TBevel;
    SpinEdit3: TSpinEdit;
    StaticText2: TStaticText;
    StaticText3: TStaticText;
    SpeedButton2: TSpeedButton;
    Bevel2: TBevel;
    Bevel3: TBevel;
    Image2: TImage;
    Label1: TLabel;
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public

    { Public declarations }
    yesno:bool;
    kind_code:integer;
    s_code:integer;
    e_code:integer;
  end;

var
  form_add_code: Tform_add_code;

implementation

{$R *.dfm}

procedure Tform_add_code.SpeedButton2Click(Sender: TObject);
begin
   close;
end;

procedure Tform_add_code.SpeedButton1Click(Sender: TObject);
begin
   if spinedit2.Value >=spinedit1.Value then
   begin
      yesno:=true;
      kind_code:=spinedit3.Value ;
      s_code:=spinedit1.Value ;
      e_code:=spinedit2.Value ;
      close;
   end
   else
   begin
      showmessage('开始号比终止号还大');
      spinedit1.SetFocus ;
   end;
end;

procedure Tform_add_code.FormShow(Sender: TObject);
begin
   yesno:=false;
end;

end.

⌨️ 快捷键说明

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