📄 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 + -