?? inputno.pas
字號:
unit InputNo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ModalForm, StdCtrls, Menus, MoveImageButton, LabelButton,
ComCtrls, ToolWin, ExtCtrls;
type
TInputNoForm = class(TMyModalForm)
Label1: TLabel;
edtInputNo: TEdit;
procedure edtInputNoKeyPress(Sender: TObject; var Key: Char);
procedure MIBtnOKClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
InputNoForm: TInputNoForm;
implementation
uses data;
{$R *.dfm}
procedure TInputNoForm.edtInputNoKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key=#13 then
begin
Key:=#0;
MIBtnOKClick(MIBtnOK);
end;
end;
procedure TInputNoForm.MIBtnOKClick(Sender: TObject);
var
Upline:TUpline;
begin
inherited;
// 學生上機
Upline.FStuNo:=Trim(edtInputNo.Text);
if Upline.FStuNo<>'' then
begin
DM.UpLine(Upline);
if (Upline.FReturnInfo ='上機成功')and
(Upline.FPrepTime < DM.SysSetup.FMinTime) then
ShowMessage('你只剩下'+inttostr(Upline.FPrepTime)+'分鐘機時,請注意充值!');
ShowMessage(Upline.FReturnInfo);
if Upline.FReturnInfo ='上機成功' then
ModalResult:=mrOK;
end;
end;
procedure TInputNoForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
Action:=caFree;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -