www.pudn.com > 电话产品防伪伺服系统(tw8).rar > Uform_add_code.pas


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.