57 lines
1.1 KiB
ObjectPascal
57 lines
1.1 KiB
ObjectPascal
![]() |
unit U_KCEdit;
|
|||
|
|
|||
|
interface
|
|||
|
|
|||
|
uses
|
|||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
Dialogs, StdCtrls, ExtCtrls, cxControls, cxContainer, cxEdit, cxTextEdit,
|
|||
|
cxCurrencyEdit;
|
|||
|
|
|||
|
type
|
|||
|
TfrmKCEdit = class(TForm)
|
|||
|
RadioGroup1: TRadioGroup;
|
|||
|
Label1: TLabel;
|
|||
|
Label2: TLabel;
|
|||
|
cxCurrencyEdit2: TcxCurrencyEdit;
|
|||
|
Button1: TButton;
|
|||
|
Button2: TButton;
|
|||
|
procedure Button2Click(Sender: TObject);
|
|||
|
procedure Button1Click(Sender: TObject);
|
|||
|
procedure FormDestroy(Sender: TObject);
|
|||
|
private
|
|||
|
{ Private declarations }
|
|||
|
public
|
|||
|
{ Public declarations }
|
|||
|
end;
|
|||
|
|
|||
|
var
|
|||
|
frmKCEdit: TfrmKCEdit;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
{$R *.dfm}
|
|||
|
|
|||
|
procedure TfrmKCEdit.Button2Click(Sender: TObject);
|
|||
|
begin
|
|||
|
close;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmKCEdit.Button1Click(Sender: TObject);
|
|||
|
begin
|
|||
|
if strtofloatdef(cxCurrencyEdit2.Text,0)=0 then
|
|||
|
begin
|
|||
|
application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>㣡','<27><>ʾ<EFBFBD><CABE>Ϣ',0);
|
|||
|
exit;
|
|||
|
end;
|
|||
|
|
|||
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><>ʾ',32+4)<>IDYES then Exit;
|
|||
|
ModalResult:=1;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmKCEdit.FormDestroy(Sender: TObject);
|
|||
|
begin
|
|||
|
frmKCEdit:=nil;
|
|||
|
end;
|
|||
|
|
|||
|
end.
|